@@ -67,7 +67,7 @@ class Component_C : public Component<M0> {
67
67
bool Proc (const std::shared_ptr<M0> &) { return ret_proc; }
68
68
};
69
69
70
- TEST (TimerComponent , init) {
70
+ TEST (CommonComponent , init) {
71
71
ret_proc = true ;
72
72
ret_init = true ;
73
73
apollo::cyber::proto::ComponentConfig compcfg;
@@ -102,7 +102,7 @@ TEST(TimerComponent, init) {
102
102
EXPECT_TRUE (comA->Process (msg_str1, msg_str2, msg_str3, msg_str4));
103
103
}
104
104
105
- TEST (TimerComponentFail , init) {
105
+ TEST (CommonComponentFail , init) {
106
106
ret_proc = false ;
107
107
ret_init = false ;
108
108
apollo::cyber::proto::ComponentConfig compcfg;
@@ -121,14 +121,16 @@ TEST(TimerComponentFail, init) {
121
121
122
122
compcfg.set_name (" perception2_f" );
123
123
apollo::cyber::proto::ReaderOption *read_opt2 = compcfg.add_readers ();
124
- read_opt2->set_channel (" /driver/channel " );
124
+ read_opt2->set_channel (" /driver/channel1 " );
125
125
auto comB = std::make_shared<Component_B<RawMessage, RawMessage>>();
126
126
EXPECT_FALSE (comB->Initialize (compcfg));
127
127
EXPECT_FALSE (comB->Process (msg_str1, msg_str2));
128
128
129
- compcfg.set_name (" perception3_F " );
129
+ compcfg.set_name (" perception3_f " );
130
130
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" );
132
134
auto comA = std::make_shared<
133
135
Component_A<RawMessage, RawMessage, RawMessage, RawMessage>>();
134
136
EXPECT_FALSE (comA->Initialize (compcfg));
0 commit comments