Skip to content

Commit

Permalink
fix misleading component testcase names
Browse files Browse the repository at this point in the history
  • Loading branch information
storypku authored and ycool committed Jan 6, 2020
1 parent d7b8209 commit 3a781eb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cyber/component/component_test.cc
Expand Up @@ -67,7 +67,7 @@ class Component_C : public Component<M0> {
bool Proc(const std::shared_ptr<M0> &) { return ret_proc; }
};

TEST(TimerComponent, init) {
TEST(CommonComponent, init) {
ret_proc = true;
ret_init = true;
apollo::cyber::proto::ComponentConfig compcfg;
Expand Down Expand Up @@ -102,7 +102,7 @@ TEST(TimerComponent, init) {
EXPECT_TRUE(comA->Process(msg_str1, msg_str2, msg_str3, msg_str4));
}

TEST(TimerComponentFail, init) {
TEST(CommonComponentFail, init) {
ret_proc = false;
ret_init = false;
apollo::cyber::proto::ComponentConfig compcfg;
Expand All @@ -121,14 +121,16 @@ TEST(TimerComponentFail, init) {

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

compcfg.set_name("perception3_F");
compcfg.set_name("perception3_f");
apollo::cyber::proto::ReaderOption *read_opt3 = compcfg.add_readers();
read_opt3->set_channel("/driver/channel");
read_opt3->set_channel("/driver/channel2");
apollo::cyber::proto::ReaderOption *read_opt4 = compcfg.add_readers();
read_opt4->set_channel("/driver/channel3");
auto comA = std::make_shared<
Component_A<RawMessage, RawMessage, RawMessage, RawMessage>>();
EXPECT_FALSE(comA->Initialize(compcfg));
Expand Down

0 comments on commit 3a781eb

Please sign in to comment.