Loading test/test.cpp +21 −0 Original line number Diff line number Diff line Loading @@ -249,6 +249,27 @@ BOOST_AUTO_TEST_CASE(AddDeviceWorks) } } BOOST_AUTO_TEST_CASE(AddDeviceWithProtoAndInstWorks) { // can handle protocol and instance prefixes { auto dd = MakeDeviceDataStringArray({"server/instance", "tango://instance/a/b/c", "myClass"}); BOOST_CHECK_NO_THROW(dp->command_inout("DbAddDevice", dd)); } // get devices { auto dd = MakeDeviceDataStringArray({"server/instance", "myClass"}); Tango::DeviceData reply; BOOST_CHECK_NO_THROW(reply = dp->command_inout("DbGetDeviceList", dd)); auto vec = ExtractStringVector(reply); std::vector<std::string> ref = {"a/b/c"}; BOOST_CHECK_EQUAL_COLLECTIONS(std::begin(vec), std::end(vec), std::begin(ref), std::end(ref)); } } BOOST_AUTO_TEST_CASE(DBInfoDoesNotThrow) { Tango::DeviceData reply; Loading Loading
test/test.cpp +21 −0 Original line number Diff line number Diff line Loading @@ -249,6 +249,27 @@ BOOST_AUTO_TEST_CASE(AddDeviceWorks) } } BOOST_AUTO_TEST_CASE(AddDeviceWithProtoAndInstWorks) { // can handle protocol and instance prefixes { auto dd = MakeDeviceDataStringArray({"server/instance", "tango://instance/a/b/c", "myClass"}); BOOST_CHECK_NO_THROW(dp->command_inout("DbAddDevice", dd)); } // get devices { auto dd = MakeDeviceDataStringArray({"server/instance", "myClass"}); Tango::DeviceData reply; BOOST_CHECK_NO_THROW(reply = dp->command_inout("DbGetDeviceList", dd)); auto vec = ExtractStringVector(reply); std::vector<std::string> ref = {"a/b/c"}; BOOST_CHECK_EQUAL_COLLECTIONS(std::begin(vec), std::end(vec), std::begin(ref), std::end(ref)); } } BOOST_AUTO_TEST_CASE(DBInfoDoesNotThrow) { Tango::DeviceData reply; Loading