Skip to content

Commit 3a781eb

Browse files
storypkuycool
authored andcommitted
fix misleading component testcase names
1 parent d7b8209 commit 3a781eb

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

cyber/component/component_test.cc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Component_C : public Component<M0> {
6767
bool Proc(const std::shared_ptr<M0> &) { return ret_proc; }
6868
};
6969

70-
TEST(TimerComponent, init) {
70+
TEST(CommonComponent, init) {
7171
ret_proc = true;
7272
ret_init = true;
7373
apollo::cyber::proto::ComponentConfig compcfg;
@@ -102,7 +102,7 @@ TEST(TimerComponent, init) {
102102
EXPECT_TRUE(comA->Process(msg_str1, msg_str2, msg_str3, msg_str4));
103103
}
104104

105-
TEST(TimerComponentFail, init) {
105+
TEST(CommonComponentFail, init) {
106106
ret_proc = false;
107107
ret_init = false;
108108
apollo::cyber::proto::ComponentConfig compcfg;
@@ -121,14 +121,16 @@ TEST(TimerComponentFail, init) {
121121

122122
compcfg.set_name("perception2_f");
123123
apollo::cyber::proto::ReaderOption *read_opt2 = compcfg.add_readers();
124-
read_opt2->set_channel("/driver/channel");
124+
read_opt2->set_channel("/driver/channel1");
125125
auto comB = std::make_shared<Component_B<RawMessage, RawMessage>>();
126126
EXPECT_FALSE(comB->Initialize(compcfg));
127127
EXPECT_FALSE(comB->Process(msg_str1, msg_str2));
128128

129-
compcfg.set_name("perception3_F");
129+
compcfg.set_name("perception3_f");
130130
apollo::cyber::proto::ReaderOption *read_opt3 = compcfg.add_readers();
131-
read_opt3->set_channel("/driver/channel");
131+
read_opt3->set_channel("/driver/channel2");
132+
apollo::cyber::proto::ReaderOption *read_opt4 = compcfg.add_readers();
133+
read_opt4->set_channel("/driver/channel3");
132134
auto comA = std::make_shared<
133135
Component_A<RawMessage, RawMessage, RawMessage, RawMessage>>();
134136
EXPECT_FALSE(comA->Initialize(compcfg));

0 commit comments

Comments
 (0)