Skip to content
This repository was archived by the owner on Dec 1, 2020. It is now read-only.

Commit 86c3be3

Browse files
author
Olav de Haas
committed
Fix naming in other tests
1 parent 6d47a77 commit 86c3be3

File tree

8 files changed

+46
-49
lines changed

8 files changed

+46
-49
lines changed

march_hardware_builder/test/absolute_encoder_builder_test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include <march_hardware/encoder/absolute_encoder.h>
1212

13-
class TestAbsoluteEncoderBuilder : public ::testing::Test
13+
class AbsoluteEncoderBuilderTest : public ::testing::Test
1414
{
1515
protected:
1616
std::string base_path;
@@ -30,7 +30,7 @@ class TestAbsoluteEncoderBuilder : public ::testing::Test
3030
}
3131
};
3232

33-
TEST_F(TestAbsoluteEncoderBuilder, ValidEncoderHip)
33+
TEST_F(AbsoluteEncoderBuilderTest, ValidEncoderHip)
3434
{
3535
YAML::Node config = this->loadTestYaml("/absolute_encoder_correct.yaml");
3636
this->joint->limits->lower = 0.0;
@@ -45,27 +45,27 @@ TEST_F(TestAbsoluteEncoderBuilder, ValidEncoderHip)
4545
ASSERT_EQ(expected, *created);
4646
}
4747

48-
TEST_F(TestAbsoluteEncoderBuilder, NoConfig)
48+
TEST_F(AbsoluteEncoderBuilderTest, NoConfig)
4949
{
5050
YAML::Node config;
5151
ASSERT_EQ(nullptr, HardwareBuilder::createAbsoluteEncoder(config[""], this->joint));
5252
}
5353

54-
TEST_F(TestAbsoluteEncoderBuilder, NoResolution)
54+
TEST_F(AbsoluteEncoderBuilderTest, NoResolution)
5555
{
5656
YAML::Node config = this->loadTestYaml("/absolute_encoder_no_resolution.yaml");
5757

5858
ASSERT_THROW(HardwareBuilder::createAbsoluteEncoder(config, this->joint), MissingKeyException);
5959
}
6060

61-
TEST_F(TestAbsoluteEncoderBuilder, NoMinPosition)
61+
TEST_F(AbsoluteEncoderBuilderTest, NoMinPosition)
6262
{
6363
YAML::Node config = this->loadTestYaml("/absolute_encoder_no_min_position.yaml");
6464

6565
ASSERT_THROW(HardwareBuilder::createAbsoluteEncoder(config, this->joint), MissingKeyException);
6666
}
6767

68-
TEST_F(TestAbsoluteEncoderBuilder, NoMaxPosition)
68+
TEST_F(AbsoluteEncoderBuilderTest, NoMaxPosition)
6969
{
7070
YAML::Node config = this->loadTestYaml("/absolute_encoder_no_max_position.yaml");
7171

march_hardware_builder/test/imc_builder_test.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <march_hardware/encoder/incremental_encoder.h>
1313
#include <march_hardware/imotioncube/imotioncube.h>
1414

15-
class IMotionCubeTest : public ::testing::Test
15+
class IMotionCubeBuilderTest : public ::testing::Test
1616
{
1717
protected:
1818
std::string base_path;
@@ -36,7 +36,7 @@ class IMotionCubeTest : public ::testing::Test
3636
}
3737
};
3838

39-
TEST_F(IMotionCubeTest, ValidIMotionCubeHip)
39+
TEST_F(IMotionCubeBuilderTest, ValidIMotionCubeHip)
4040
{
4141
YAML::Node config = this->loadTestYaml("/imotioncube_correct.yaml");
4242
this->joint->limits->lower = 0.0;
@@ -57,21 +57,21 @@ TEST_F(IMotionCubeTest, ValidIMotionCubeHip)
5757
ASSERT_EQ(expected, *created);
5858
}
5959

60-
TEST_F(IMotionCubeTest, NoConfig)
60+
TEST_F(IMotionCubeBuilderTest, NoConfig)
6161
{
6262
YAML::Node config;
6363
ASSERT_EQ(nullptr, HardwareBuilder::createIMotionCube(config["imotioncube"], march::ActuationMode::unknown,
6464
this->joint, this->pdo_interface, this->sdo_interface));
6565
}
6666

67-
TEST_F(IMotionCubeTest, NoUrdfJoint)
67+
TEST_F(IMotionCubeBuilderTest, NoUrdfJoint)
6868
{
6969
YAML::Node config = this->loadTestYaml("/imotioncube_correct.yaml");
7070
ASSERT_EQ(nullptr, HardwareBuilder::createIMotionCube(config, march::ActuationMode::unknown, nullptr,
7171
this->pdo_interface, this->sdo_interface));
7272
}
7373

74-
TEST_F(IMotionCubeTest, NoAbsoluteEncoder)
74+
TEST_F(IMotionCubeBuilderTest, NoAbsoluteEncoder)
7575
{
7676
YAML::Node config = this->loadTestYaml("/imotioncube_no_absolute_encoder.yaml");
7777

@@ -80,7 +80,7 @@ TEST_F(IMotionCubeTest, NoAbsoluteEncoder)
8080
MissingKeyException);
8181
}
8282

83-
TEST_F(IMotionCubeTest, NoIncrementalEncoder)
83+
TEST_F(IMotionCubeBuilderTest, NoIncrementalEncoder)
8484
{
8585
YAML::Node config = this->loadTestYaml("/imotioncube_no_incremental_encoder.yaml");
8686

@@ -89,7 +89,7 @@ TEST_F(IMotionCubeTest, NoIncrementalEncoder)
8989
MissingKeyException);
9090
}
9191

92-
TEST_F(IMotionCubeTest, NoSlaveIndex)
92+
TEST_F(IMotionCubeBuilderTest, NoSlaveIndex)
9393
{
9494
YAML::Node config = this->loadTestYaml("/imotioncube_no_slave_index.yaml");
9595

march_hardware_builder/test/incremental_encoder_builder_test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include <march_hardware/encoder/incremental_encoder.h>
1111

12-
class TestIncrementalEncoderBuilder : public ::testing::Test
12+
class IncrementalEncoderBuilderTest : public ::testing::Test
1313
{
1414
protected:
1515
std::string base_path;
@@ -25,7 +25,7 @@ class TestIncrementalEncoderBuilder : public ::testing::Test
2525
}
2626
};
2727

28-
TEST_F(TestIncrementalEncoderBuilder, ValidIncrementalEncoder)
28+
TEST_F(IncrementalEncoderBuilderTest, ValidIncrementalEncoder)
2929
{
3030
YAML::Node config = this->loadTestYaml("/incremental_encoder_correct.yaml");
3131

@@ -34,20 +34,20 @@ TEST_F(TestIncrementalEncoderBuilder, ValidIncrementalEncoder)
3434
ASSERT_EQ(expected, *created);
3535
}
3636

37-
TEST_F(TestIncrementalEncoderBuilder, NoConfig)
37+
TEST_F(IncrementalEncoderBuilderTest, NoConfig)
3838
{
3939
YAML::Node config;
4040
ASSERT_EQ(nullptr, HardwareBuilder::createIncrementalEncoder(config[""]));
4141
}
4242

43-
TEST_F(TestIncrementalEncoderBuilder, NoResolution)
43+
TEST_F(IncrementalEncoderBuilderTest, NoResolution)
4444
{
4545
YAML::Node config = this->loadTestYaml("/incremental_encoder_no_resolution.yaml");
4646

4747
ASSERT_THROW(HardwareBuilder::createIncrementalEncoder(config), MissingKeyException);
4848
}
4949

50-
TEST_F(TestIncrementalEncoderBuilder, NoTransmission)
50+
TEST_F(IncrementalEncoderBuilderTest, NoTransmission)
5151
{
5252
YAML::Node config = this->loadTestYaml("/incremental_encoder_no_transmission.yaml");
5353

march_hardware_builder/test/joint_builder_test.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <march_hardware/error/hardware_exception.h>
1414
#include <march_hardware/imotioncube/imotioncube.h>
1515

16-
class JointTest : public ::testing::Test
16+
class JointBuilderTest : public ::testing::Test
1717
{
1818
protected:
1919
std::string base_path;
@@ -37,7 +37,7 @@ class JointTest : public ::testing::Test
3737
}
3838
};
3939

40-
TEST_F(JointTest, ValidJointHip)
40+
TEST_F(JointBuilderTest, ValidJointHip)
4141
{
4242
YAML::Node config = this->loadTestYaml("/joint_correct.yaml");
4343
this->joint->limits->lower = 0.0;
@@ -62,7 +62,7 @@ TEST_F(JointTest, ValidJointHip)
6262
ASSERT_EQ(expected, created);
6363
}
6464

65-
TEST_F(JointTest, ValidNotActuated)
65+
TEST_F(JointBuilderTest, ValidNotActuated)
6666
{
6767
YAML::Node config = this->loadTestYaml("/joint_correct_not_actuated.yaml");
6868
this->joint->limits->lower = 0.0;
@@ -86,7 +86,7 @@ TEST_F(JointTest, ValidNotActuated)
8686
ASSERT_EQ(expected, created);
8787
}
8888

89-
TEST_F(JointTest, NoActuate)
89+
TEST_F(JointBuilderTest, NoActuate)
9090
{
9191
YAML::Node config = this->loadTestYaml("/joint_no_actuate.yaml");
9292

@@ -95,7 +95,7 @@ TEST_F(JointTest, NoActuate)
9595
MissingKeyException);
9696
}
9797

98-
TEST_F(JointTest, NoIMotionCube)
98+
TEST_F(JointBuilderTest, NoIMotionCube)
9999
{
100100
YAML::Node config = this->loadTestYaml("/joint_no_imotioncube.yaml");
101101
march::Joint joint = HardwareBuilder::createJoint(config, "test_joint_no_imotioncube", this->joint,
@@ -104,7 +104,7 @@ TEST_F(JointTest, NoIMotionCube)
104104
ASSERT_FALSE(joint.hasIMotionCube());
105105
}
106106

107-
TEST_F(JointTest, NoTemperatureGES)
107+
TEST_F(JointBuilderTest, NoTemperatureGES)
108108
{
109109
YAML::Node config = this->loadTestYaml("/joint_no_temperature_ges.yaml");
110110
this->joint->limits->lower = 0.0;
@@ -116,7 +116,7 @@ TEST_F(JointTest, NoTemperatureGES)
116116
this->pdo_interface, this->sdo_interface));
117117
}
118118

119-
TEST_F(JointTest, ValidActuationMode)
119+
TEST_F(JointBuilderTest, ValidActuationMode)
120120
{
121121
YAML::Node config = this->loadTestYaml("/joint_correct_position_mode.yaml");
122122
this->joint->limits->lower = 0.0;
@@ -138,15 +138,15 @@ TEST_F(JointTest, ValidActuationMode)
138138
ASSERT_EQ(expected, created);
139139
}
140140

141-
TEST_F(JointTest, EmptyJoint)
141+
TEST_F(JointBuilderTest, EmptyJoint)
142142
{
143143
YAML::Node config;
144144
ASSERT_THROW(
145145
HardwareBuilder::createJoint(config, "test_joint_empty", this->joint, this->pdo_interface, this->sdo_interface),
146146
MissingKeyException);
147147
}
148148

149-
TEST_F(JointTest, NoUrdfJoint)
149+
TEST_F(JointBuilderTest, NoUrdfJoint)
150150
{
151151
YAML::Node config = this->loadTestYaml("/joint_correct.yaml");
152152
ASSERT_THROW(HardwareBuilder::createJoint(config, "test", nullptr, this->pdo_interface, this->sdo_interface),

march_hardware_builder/test/pdb_builder_test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <march_hardware_builder/hardware_config_exceptions.h>
77
#include <march_hardware_builder/hardware_builder.h>
88

9-
class PowerDistributionBoardTest : public ::testing::Test
9+
class PowerDistributionBoardBuilderTest : public ::testing::Test
1010
{
1111
protected:
1212
std::string base_path;
@@ -26,7 +26,7 @@ class PowerDistributionBoardTest : public ::testing::Test
2626
}
2727
};
2828

29-
TEST_F(PowerDistributionBoardTest, ValidPowerDistributionBoard)
29+
TEST_F(PowerDistributionBoardBuilderTest, ValidPowerDistributionBoard)
3030
{
3131
std::string fullPath = this->fullPath("/power_distribution_board.yaml");
3232
YAML::Node config = YAML::LoadFile(fullPath);
@@ -43,30 +43,30 @@ TEST_F(PowerDistributionBoardTest, ValidPowerDistributionBoard)
4343
ASSERT_EQ(powerDistributionBoard, *createdPowerDistributionBoard);
4444
}
4545

46-
TEST_F(PowerDistributionBoardTest, NoConfig)
46+
TEST_F(PowerDistributionBoardBuilderTest, NoConfig)
4747
{
4848
YAML::Node config;
4949
ASSERT_EQ(nullptr,
5050
HardwareBuilder::createPowerDistributionBoard(config["pdb"], this->pdo_interface, this->sdo_interface));
5151
}
5252

53-
TEST_F(PowerDistributionBoardTest, MissingSlaveIndex)
53+
TEST_F(PowerDistributionBoardBuilderTest, MissingSlaveIndex)
5454
{
5555
std::string fullPath = this->fullPath("/power_distribution_board_missing_slave_index.yaml");
5656
YAML::Node config = YAML::LoadFile(fullPath);
5757
ASSERT_THROW(HardwareBuilder::createPowerDistributionBoard(config, this->pdo_interface, this->sdo_interface),
5858
MissingKeyException);
5959
}
6060

61-
TEST_F(PowerDistributionBoardTest, MissingHighVoltageStateIndex)
61+
TEST_F(PowerDistributionBoardBuilderTest, MissingHighVoltageStateIndex)
6262
{
6363
std::string fullPath = this->fullPath("/power_distribution_board_missing_high_voltage_state_index.yaml");
6464
YAML::Node config = YAML::LoadFile(fullPath);
6565
ASSERT_THROW(HardwareBuilder::createPowerDistributionBoard(config, this->pdo_interface, this->sdo_interface),
6666
MissingKeyException);
6767
}
6868

69-
TEST_F(PowerDistributionBoardTest, NegativeOffset)
69+
TEST_F(PowerDistributionBoardBuilderTest, NegativeOffset)
7070
{
7171
std::string fullPath = this->fullPath("/power_distribution_board_negative_offset.yaml");
7272
YAML::Node config = YAML::LoadFile(fullPath);

march_hardware_interface/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ install(DIRECTORY config launch
7272
## Add gtest based cpp test target and link libraries
7373
if(CATKIN_ENABLE_TESTING)
7474
catkin_add_gtest(${PROJECT_NAME}_test
75-
test/TestRunner.cpp
76-
test/TestPdbStateInterface.cpp
75+
test/pdb_state_interface_test.cpp
76+
test/test_runner.cpp
7777
)
7878
target_link_libraries(${PROJECT_NAME}_test ${catkin_LIBRARIES})
7979

0 commit comments

Comments
 (0)