From 3a781eb7a4577c05126cf01177733f297c826d4a Mon Sep 17 00:00:00 2001 From: Liu Jiaming Date: Mon, 6 Jan 2020 19:35:08 +0800 Subject: [PATCH] fix misleading component testcase names --- cyber/component/component_test.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cyber/component/component_test.cc b/cyber/component/component_test.cc index e21e54fde8d..b26e075e151 100644 --- a/cyber/component/component_test.cc +++ b/cyber/component/component_test.cc @@ -67,7 +67,7 @@ class Component_C : public Component { bool Proc(const std::shared_ptr &) { return ret_proc; } }; -TEST(TimerComponent, init) { +TEST(CommonComponent, init) { ret_proc = true; ret_init = true; apollo::cyber::proto::ComponentConfig compcfg; @@ -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; @@ -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>(); 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>(); EXPECT_FALSE(comA->Initialize(compcfg));