2020-12-26 14:12:05 -08:00
|
|
|
// Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
|
// the WPILib BSD license file in the root directory of this project.
|
2020-07-15 00:33:57 -07:00
|
|
|
|
|
|
|
|
#include "frc/Joystick.h" // NOLINT(build/include_order)
|
|
|
|
|
|
2021-08-05 22:04:51 -04:00
|
|
|
#include "JoystickTestMacros.h"
|
2020-07-15 00:33:57 -07:00
|
|
|
#include "frc/simulation/JoystickSim.h"
|
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
|
|
|
|
|
|
using namespace frc;
|
|
|
|
|
|
2023-01-16 18:28:06 +02:00
|
|
|
// https://github.com/wpilibsuite/allwpilib/issues/1550
|
|
|
|
|
TEST(JoystickTest, FastDeconstruction) {
|
|
|
|
|
Joystick joystick{0};
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-05 22:04:51 -04:00
|
|
|
AXIS_TEST(Joystick, X)
|
|
|
|
|
AXIS_TEST(Joystick, Y)
|
|
|
|
|
AXIS_TEST(Joystick, Z)
|
|
|
|
|
AXIS_TEST(Joystick, Throttle)
|
|
|
|
|
AXIS_TEST(Joystick, Twist)
|
2020-07-15 00:33:57 -07:00
|
|
|
|
2021-08-05 22:04:51 -04:00
|
|
|
BUTTON_TEST(Joystick, Trigger)
|
|
|
|
|
BUTTON_TEST(Joystick, Top)
|