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

@@ -13,7 +13,7 @@
static constexpr double kScale = 270.0;
static constexpr double kAngle = 180.0;
TEST(AnalogPotentiometerTest, TestInitialSettings) {
TEST(AnalogPotentiometerTest, InitialSettings) {
frc::AnalogOutput m_fakePot{TestBench::kAnalogOutputChannel};
frc::AnalogPotentiometer m_pot{TestBench::kFakeAnalogOutputChannel, kScale};
@@ -23,7 +23,7 @@ TEST(AnalogPotentiometerTest, TestInitialSettings) {
<< "The potentiometer did not initialize to 0.";
}
TEST(AnalogPotentiometerTest, TestRangeValues) {
TEST(AnalogPotentiometerTest, RangeValues) {
frc::AnalogOutput m_fakePot{TestBench::kAnalogOutputChannel};
frc::AnalogPotentiometer m_pot{TestBench::kFakeAnalogOutputChannel, kScale};

View File

@@ -16,7 +16,7 @@
* implementation works as intended. We configure the FPGA and then query it to
* make sure that the acutal configuration matches.
*/
TEST(DigitalGlitchFilterTest, BasicTest) {
TEST(DigitalGlitchFilterTest, Basic) {
frc::DigitalInput input1{1};
frc::DigitalInput input2{2};
frc::DigitalInput input3{3};

View File

@@ -64,14 +64,14 @@ class FakeEncoderTest : public testing::Test {
/**
* Test the encoder by reseting it to 0 and reading the value.
*/
TEST_F(FakeEncoderTest, TestDefaultState) {
TEST_F(FakeEncoderTest, DefaultState) {
EXPECT_DOUBLE_EQ(0.0, m_encoder.Get()) << "The encoder did not start at 0.";
}
/**
* Test the encoder by setting the digital outputs and reading the value.
*/
TEST_F(FakeEncoderTest, TestCountUp) {
TEST_F(FakeEncoderTest, CountUp) {
m_encoder.Reset();
Simulate100QuadratureTicks();
@@ -81,7 +81,7 @@ TEST_F(FakeEncoderTest, TestCountUp) {
/**
* Test that the encoder can stay reset while the index source is high
*/
TEST_F(FakeEncoderTest, TestResetWhileHigh) {
TEST_F(FakeEncoderTest, ResetWhileHigh) {
m_encoder.SetIndexSource(*m_indexAnalogTriggerOutput,
frc::Encoder::IndexingType::kResetWhileHigh);
@@ -97,7 +97,7 @@ TEST_F(FakeEncoderTest, TestResetWhileHigh) {
/**
* Test that the encoder can reset when the index source goes from low to high
*/
TEST_F(FakeEncoderTest, TestResetOnRisingEdge) {
TEST_F(FakeEncoderTest, ResetOnRisingEdge) {
m_encoder.SetIndexSource(*m_indexAnalogTriggerOutput,
frc::Encoder::IndexingType::kResetOnRisingEdge);
@@ -113,7 +113,7 @@ TEST_F(FakeEncoderTest, TestResetOnRisingEdge) {
/**
* Test that the encoder can stay reset while the index source is low
*/
TEST_F(FakeEncoderTest, TestResetWhileLow) {
TEST_F(FakeEncoderTest, ResetWhileLow) {
m_encoder.SetIndexSource(*m_indexAnalogTriggerOutput,
frc::Encoder::IndexingType::kResetWhileLow);
@@ -129,7 +129,7 @@ TEST_F(FakeEncoderTest, TestResetWhileLow) {
/**
* Test that the encoder can reset when the index source goes from high to low
*/
TEST_F(FakeEncoderTest, TestResetOnFallingEdge) {
TEST_F(FakeEncoderTest, ResetOnFallingEdge) {
m_encoder.SetIndexSource(*m_indexAnalogTriggerOutput,
frc::Encoder::IndexingType::kResetOnFallingEdge);

View File

@@ -9,7 +9,7 @@
#include "frc/Timer.h"
#include "gtest/gtest.h"
TEST(NotifierTest, TestStartPeriodicAndStop) {
TEST(NotifierTest, StartPeriodicAndStop) {
uint32_t counter = 0;
frc::Notifier notifier{[&] { ++counter; }};
@@ -29,7 +29,7 @@ TEST(NotifierTest, TestStartPeriodicAndStop) {
fmt::print("Received {} notifications in 3 seconds\n", counter - 10);
}
TEST(NotifierTest, TestStartSingle) {
TEST(NotifierTest, StartSingle) {
uint32_t counter = 0;
frc::Notifier notifier{[&] { ++counter; }};