mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Make C++ test names more consistent (#3586)
Inconsistent names were found using the following regular expressions. * `rg "TEST(_F|_P)?\(\w+,\s+\w+Test\)"` * `rg "TEST(_F|_P)?\(\w+,\s+Test\w+\)"` * `rg "TEST(_F|_P)?\(\w+Tests,\s+\w+\)"` Fixes #3495.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#include "hal/HAL.h"
|
||||
|
||||
namespace hal {
|
||||
TEST(HALTests, RuntimeType) {
|
||||
TEST(HALTest, RuntimeType) {
|
||||
EXPECT_EQ(HAL_RuntimeType::HAL_Runtime_Simulation, HAL_GetRuntimeType());
|
||||
}
|
||||
} // namespace hal
|
||||
@@ -38,7 +38,7 @@ struct CANSendCallbackStore {
|
||||
int32_t handle;
|
||||
};
|
||||
|
||||
TEST(HALCanTests, CanIdPackingTest) {
|
||||
TEST(CANTest, CanIdPacking) {
|
||||
int32_t status = 0;
|
||||
int32_t deviceId = 12;
|
||||
CANTestStore testStore(deviceId, &status);
|
||||
|
||||
@@ -13,7 +13,7 @@ class MyTestClass {};
|
||||
} // namespace
|
||||
|
||||
namespace hal {
|
||||
TEST(HandleTests, ClassedHandleTest) {
|
||||
TEST(HandleTest, ClassedHandle) {
|
||||
hal::IndexedClassedHandleResource<HAL_TestHandle, MyTestClass, 8,
|
||||
HAL_HandleEnum::Vendor>
|
||||
testClass;
|
||||
@@ -19,7 +19,7 @@ void TestAnalogInInitializationCallback(const char* name, void* param,
|
||||
gTestAnalogInCallbackValue = *value;
|
||||
}
|
||||
|
||||
TEST(AnalogInSimTests, TestAnalogInInitialization) {
|
||||
TEST(AnalogInSimTest, AnalogInInitialization) {
|
||||
const int INDEX_TO_TEST = 1;
|
||||
|
||||
int callbackParam = 0;
|
||||
@@ -19,7 +19,7 @@ void TestAnalogOutInitializationCallback(const char* name, void* param,
|
||||
gTestAnalogOutCallbackValue = *value;
|
||||
}
|
||||
|
||||
TEST(AnalogOutSimTests, TestAnalogOutInitialization) {
|
||||
TEST(AnalogOutSimTest, AnalogOutInitialization) {
|
||||
const int INDEX_TO_TEST = 1;
|
||||
|
||||
int callbackParam = 0;
|
||||
@@ -19,7 +19,7 @@ void TestDigitalIoInitializationCallback(const char* name, void* param,
|
||||
gTestDigitalIoCallbackValue = *value;
|
||||
}
|
||||
|
||||
TEST(DigitalIoSimTests, TestDigitalIoInitialization) {
|
||||
TEST(DigitalIoSimTest, DigitalIoInitialization) {
|
||||
const int INDEX_TO_TEST = 3;
|
||||
|
||||
int callbackParam = 0;
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
namespace hal {
|
||||
|
||||
TEST(DriverStationTests, JoystickTests) {
|
||||
TEST(DriverStationTest, Joystick) {
|
||||
HAL_JoystickAxes axes;
|
||||
HAL_JoystickPOVs povs;
|
||||
HAL_JoystickButtons buttons;
|
||||
@@ -109,7 +109,7 @@ TEST(DriverStationTests, JoystickTests) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST(DriverStationTests, EventInfoTest) {
|
||||
TEST(DriverStationTest, EventInfo) {
|
||||
std::string eventName = "UnitTest";
|
||||
std::string gameData = "Insert game specific info here :D";
|
||||
HAL_MatchInfo info;
|
||||
@@ -19,7 +19,7 @@ void TestI2CInitializationCallback(const char* name, void* param,
|
||||
gTestI2CCallbackValue = *value;
|
||||
}
|
||||
|
||||
TEST(I2CSimTests, TestI2CInitialization) {
|
||||
TEST(I2CSimTest, I2CInitialization) {
|
||||
const int INDEX_TO_TEST = 1;
|
||||
|
||||
int32_t status = 0;
|
||||
@@ -19,7 +19,7 @@ void TestSolenoidInitializationCallback(const char* name, void* param,
|
||||
gTestSolenoidCallbackValue = *value;
|
||||
}
|
||||
|
||||
TEST(SolenoidSimTests, TestPCMInitialization) {
|
||||
TEST(PCMDataTest, PCMInitialization) {
|
||||
const int MODULE_TO_TEST = 2;
|
||||
|
||||
int callbackParam = 0;
|
||||
@@ -19,7 +19,7 @@ void TestPdpInitializationCallback(const char* name, void* param,
|
||||
gTestPdpCallbackValue = *value;
|
||||
}
|
||||
|
||||
TEST(PdpSimTests, TestPdpInitialization) {
|
||||
TEST(PdpSimTest, PdpInitialization) {
|
||||
const int INDEX_TO_TEST = 1;
|
||||
|
||||
int callbackParam = 0;
|
||||
@@ -19,7 +19,7 @@ void TestPwmInitializationCallback(const char* name, void* param,
|
||||
gTestPwmCallbackValue = *value;
|
||||
}
|
||||
|
||||
TEST(PWMSimTests, TestPwmInitialization) {
|
||||
TEST(PWMSimTest, PwmInitialization) {
|
||||
const int INDEX_TO_TEST = 7;
|
||||
|
||||
int callbackParam = 0;
|
||||
@@ -19,7 +19,7 @@ void TestRelayInitializationCallback(const char* name, void* param,
|
||||
gTestRelayCallbackValue = *value;
|
||||
}
|
||||
|
||||
TEST(RelaySimTests, TestRelayInitialization) {
|
||||
TEST(RelaySimTest, RelayInitialization) {
|
||||
const int INDEX_TO_TEST = 3;
|
||||
|
||||
int callbackParam = 0;
|
||||
@@ -19,7 +19,7 @@ void TestSpiInitializationCallback(const char* name, void* param,
|
||||
gTestSpiCallbackValue = *value;
|
||||
}
|
||||
|
||||
TEST(SpiSimTests, TestSpiInitialization) {
|
||||
TEST(SpiSimTest, SpiInitialization) {
|
||||
const int INDEX_TO_TEST = 2;
|
||||
|
||||
int32_t status = 0;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
namespace hal {
|
||||
|
||||
TEST(SimDeviceSimTests, TestEnabled) {
|
||||
TEST(SimDeviceSimTest, Enabled) {
|
||||
ASSERT_TRUE(HALSIM_IsSimDeviceEnabled("foo"));
|
||||
HALSIM_SetSimDeviceEnabled("f", false);
|
||||
HALSIM_SetSimDeviceEnabled("foob", true);
|
||||
Reference in New Issue
Block a user