From 203eaebc51c5d8c3e5a66cb1f69d5e83a71b4392 Mon Sep 17 00:00:00 2001 From: Olivier Stasse <ostasse@laas.fr> Date: Thu, 28 Feb 2019 16:30:29 +0100 Subject: [PATCH] [tests] Improves unitary test on pool.cpp --- tests/pool.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/pool.cpp b/tests/pool.cpp index bce4d75..d206e10 100644 --- a/tests/pool.cpp +++ b/tests/pool.cpp @@ -120,7 +120,7 @@ BOOST_AUTO_TEST_CASE (pool_display) " fontcolor = black, color = black, fillcolor=cyan, style=filled, shape=box ]\n" "}\n"; - /* Check the two substring (remove the date) */ + /* Check the two substring (remove the date) -**/ std::string s_output_wgph = oss_output_wgph.str(); std::string s_crmk="*/"; @@ -134,6 +134,15 @@ BOOST_AUTO_TEST_CASE (pool_display) BOOST_CHECK(two_sub_string_identical); + // Test name of an object. + std::istringstream an_iss("MyEntityInst.in_double"); + + dg::SignalBase<int> &aSignal= + dg::PoolStorage::getInstance()->getSignal(an_iss); + + std::string aSignalName=aSignal.getName(); + testExistence = aSignalName=="MyEntity(MyEntityInst)::input(double)::in_double"; + BOOST_CHECK(testExistence); // Deregister the entity. dg::PoolStorage::getInstance()->deregisterEntity -- GitLab