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:
Tyler Veness
2021-09-17 22:51:51 -07:00
committed by GitHub
parent 5c88685495
commit fe59e4b9fe
73 changed files with 189 additions and 189 deletions

View File

@@ -12,7 +12,7 @@
namespace frc::sim {
TEST(ADXL345SimTests, SetSpiAttributes) {
TEST(ADXL345SimTest, SetSpiAttributes) {
HAL_Initialize(500, 0);
ADXL345_SPI accel(SPI::kMXP, Accelerometer::kRange_2G);
@@ -36,7 +36,7 @@ TEST(ADXL345SimTests, SetSpiAttributes) {
EXPECT_EQ(2.29, allAccel.ZAxis);
}
TEST(ADXL345SimTests, SetI2CAttribute) {
TEST(ADXL345SimTest, SetI2CAttribute) {
HAL_Initialize(500, 0);
ADXL345_I2C accel(I2C::kMXP);

View File

@@ -11,7 +11,7 @@
namespace frc::sim {
TEST(ADXL362SimTests, SetAttributes) {
TEST(ADXL362SimTest, SetAttributes) {
HAL_Initialize(500, 0);
ADXL362 accel(SPI::kMXP, Accelerometer::kRange_2G);

View File

@@ -14,7 +14,7 @@
#define EXPECT_NEAR_UNITS(val1, val2, eps) \
EXPECT_LE(units::math::abs(val1 - val2), eps)
TEST(AnalogEncoderSimTest, TestBasic) {
TEST(AnalogEncoderSimTest, Basic) {
frc::AnalogInput ai(0);
frc::AnalogEncoder encoder{ai};
frc::sim::AnalogEncoderSim encoderSim{encoder};

View File

@@ -50,7 +50,7 @@ TEST(DriverStationTest, AutonomousMode) {
EXPECT_TRUE(callback.GetLastValue());
}
TEST(DriverStationTest, TestMode) {
TEST(DriverStationTest, Mode) {
HAL_Initialize(500, 0);
DriverStationSim::ResetData();

View File

@@ -11,7 +11,7 @@
using namespace frc::sim;
TEST(SimDeviceSimTests, TestBasic) {
TEST(SimDeviceSimTest, Basic) {
hal::SimDevice dev{"test"};
hal::SimBoolean devBool = dev.CreateBoolean("bool", false, false);
@@ -22,7 +22,7 @@ TEST(SimDeviceSimTests, TestBasic) {
EXPECT_TRUE(devBool.Get());
}
TEST(SimDeviceSimTests, TestEnumerateDevices) {
TEST(SimDeviceSimTest, EnumerateDevices) {
hal::SimDevice dev{"test"};
bool foundit = false;

View File

@@ -27,7 +27,7 @@
using namespace frc::sim;
TEST(SimInitializationTests, TestAllInitialize) {
TEST(SimInitializationTest, AllInitialize) {
HAL_Initialize(500, 0);
BuiltInAccelerometerSim biacsim;
AnalogGyroSim agsim{0};

View File

@@ -24,7 +24,7 @@
#include "frc/system/plant/LinearSystemId.h"
#include "gtest/gtest.h"
TEST(StateSpaceSimTest, TestFlywheelSim) {
TEST(StateSpaceSimTest, FlywheelSim) {
const frc::LinearSystem<1, 1, 1> plant =
frc::LinearSystemId::IdentifyVelocitySystem<units::radian>(
0.02_V / 1_rad_per_s, 0.01_V / 1_rad_per_s_sq);