diff options
author | Youngjae Shin <yj99.shin@samsung.com> | 2022-09-23 16:12:56 +0900 |
---|---|---|
committer | Youngjae Shin <yj99.shin@samsung.com> | 2022-09-23 16:14:04 +0900 |
commit | c56dca59160ac22508865d4ec56b4b23d572d6c8 (patch) | |
tree | 86334f60a18bbe4a14a847fca29753bdb00760a4 | |
parent | 98f442dcc21f52909a80c3fffc16982b633aca9a (diff) | |
download | aitt-tizen_7.0_hotfix.tar.gz aitt-tizen_7.0_hotfix.tar.bz2 aitt-tizen_7.0_hotfix.zip |
revise test case nametizen_7.0_m2_releaseaccepted/tizen/unified/20220926.025514accepted/tizen/7.0/unified/hotfix/20221116.105337accepted/tizen/7.0/unified/20221110.060112tizen_7.0_hotfixaccepted/tizen_7.0_unified_hotfix
-rw-r--r-- | modules/tcp/tests/TCPServer_test.cc | 14 | ||||
-rw-r--r-- | modules/tcp/tests/TCP_test.cc | 12 | ||||
-rw-r--r-- | modules/webrtc/tests/WEBRTC_test.cc | 24 | ||||
-rw-r--r-- | tests/AITT_test.cc | 52 | ||||
-rw-r--r-- | tests/MosquittoMQ_mocktest.cc | 20 | ||||
-rw-r--r-- | tests/aitt_c_manualtest.cc | 8 | ||||
-rw-r--r-- | tools/FlexbufPrinter.cc | 5 |
7 files changed, 69 insertions, 66 deletions
diff --git a/modules/tcp/tests/TCPServer_test.cc b/modules/tcp/tests/TCPServer_test.cc index d2206aa..05a430b 100644 --- a/modules/tcp/tests/TCPServer_test.cc +++ b/modules/tcp/tests/TCPServer_test.cc @@ -30,14 +30,14 @@ using namespace AittTCPNamespace; -TEST(TCPServer, Positive_Create_Anytime) +TEST(TCPServer, Create_P_Anytime) { unsigned short port = TEST_SERVER_PORT; std::unique_ptr<TCP::Server> tcp(new TCP::Server(TEST_SERVER_ADDRESS, port)); ASSERT_NE(tcp, nullptr); } -TEST(TCPServer, Negative_Create_Anytime) +TEST(TCPServer, Create_N_Anytime) { try { unsigned short port = TEST_SERVER_PORT; @@ -49,7 +49,7 @@ TEST(TCPServer, Negative_Create_Anytime) } } -TEST(TCPServer, Positive_Create_AutoPort_Anytime) +TEST(TCPServer, Create_AutoPort_P_Anytime) { unsigned short port = TEST_SERVER_AVAILABLE_PORT; std::unique_ptr<TCP::Server> tcp(new TCP::Server(TEST_SERVER_ADDRESS, port)); @@ -57,7 +57,7 @@ TEST(TCPServer, Positive_Create_AutoPort_Anytime) ASSERT_NE(port, 0); } -TEST(TCPServer, Positive_GetPort_Anytime) +TEST(TCPServer, GetPort_P_Anytime) { unsigned short port = TEST_SERVER_PORT; std::unique_ptr<TCP::Server> tcp(new TCP::Server(TEST_SERVER_ADDRESS, port)); @@ -65,7 +65,7 @@ TEST(TCPServer, Positive_GetPort_Anytime) ASSERT_EQ(tcp->GetPort(), TEST_SERVER_PORT); } -TEST(TCPServer, Positive_GetHandle_Anytime) +TEST(TCPServer, GetHandle_P_Anytime) { unsigned short port = TEST_SERVER_PORT; std::unique_ptr<TCP::Server> tcp(new TCP::Server(TEST_SERVER_ADDRESS, port)); @@ -73,7 +73,7 @@ TEST(TCPServer, Positive_GetHandle_Anytime) ASSERT_GE(tcp->GetHandle(), 0); } -TEST(TCPServer, Positive_GetPort_AutoPort_Anytime) +TEST(TCPServer, GetPort_AutoPort_P_Anytime) { unsigned short port = TEST_SERVER_AVAILABLE_PORT; std::unique_ptr<TCP::Server> tcp(new TCP::Server(TEST_SERVER_ADDRESS, port)); @@ -81,7 +81,7 @@ TEST(TCPServer, Positive_GetPort_AutoPort_Anytime) ASSERT_EQ(tcp->GetPort(), port); } -TEST(TCPServer, Positive_AcceptPeer_Anytime) +TEST(TCPServer, AcceptPeer_P_Anytime) { std::mutex m; std::condition_variable ready_cv; diff --git a/modules/tcp/tests/TCP_test.cc b/modules/tcp/tests/TCP_test.cc index d356702..0811ca4 100644 --- a/modules/tcp/tests/TCP_test.cc +++ b/modules/tcp/tests/TCP_test.cc @@ -79,7 +79,7 @@ class TCPTest : public testing::Test { std::function<void(void)> customTest; }; -TEST(TCP, Negative_Create_InvalidPort_Anytime) +TEST(TCP, Create_InvalidPort_N_Anytime) { try { TCP::ConnectInfo info; @@ -91,7 +91,7 @@ TEST(TCP, Negative_Create_InvalidPort_Anytime) } } -TEST(TCP, Negative_Create_InvalidAddress_Anytime) +TEST(TCP, Create_InvalidAddress_N_Anytime) { try { TCP::ConnectInfo info; @@ -103,7 +103,7 @@ TEST(TCP, Negative_Create_InvalidAddress_Anytime) } } -TEST_F(TCPTest, Positive_GetPeerInfo_Anytime) +TEST_F(TCPTest, GetPeerInfo_P_Anytime) { std::string peerHost; unsigned short peerPort = 0; @@ -115,21 +115,21 @@ TEST_F(TCPTest, Positive_GetPeerInfo_Anytime) ASSERT_GT(peerPort, 0); } -TEST_F(TCPTest, Positive_GetHandle_Anytime) +TEST_F(TCPTest, GetHandle_P_Anytime) { RunServer(); int handle = peer->GetHandle(); ASSERT_GE(handle, 0); } -TEST_F(TCPTest, Positive_GetPort_Anytime) +TEST_F(TCPTest, GetPort_P_Anytime) { RunServer(); unsigned short port = peer->GetPort(); ASSERT_GT(port, 0); } -TEST_F(TCPTest, Positive_SendRecv_Anytime) +TEST_F(TCPTest, SendRecv_P_Anytime) { char helloBuffer[TEST_BUFFER_SIZE]; char byeBuffer[TEST_BUFFER_SIZE]; diff --git a/modules/webrtc/tests/WEBRTC_test.cc b/modules/webrtc/tests/WEBRTC_test.cc index 17726c5..1df1e83 100644 --- a/modules/webrtc/tests/WEBRTC_test.cc +++ b/modules/webrtc/tests/WEBRTC_test.cc @@ -65,7 +65,7 @@ static void onConnectionStateChanged(IfaceServer::ConnectionState state, MqttSer } } -TEST_F(MqttServerTest, Positive_Connect_Anytime) +TEST_F(MqttServerTest, Connect_P_Anytime) { try { MqttServer server(webrtc_src_config_); @@ -98,7 +98,7 @@ static void onConnectionStateChangedPositive_Connect_Src_Sinks_Anytime( } } -TEST_F(MqttServerTest, Positive_Connect_Src_Sinks_Anytime) +TEST_F(MqttServerTest, Connect_Src_Sinks_P_Anytime) { try { Positive_Connect_Src_Sinks_Anytime_connect_count = 0; @@ -145,7 +145,7 @@ TEST_F(MqttServerTest, Positive_Connect_Src_Sinks_Anytime) } } -TEST_F(MqttServerTest, Negative_Disconnect_Anytime) +TEST_F(MqttServerTest, Disconnect_N_Anytime) { EXPECT_THROW( { @@ -164,7 +164,7 @@ TEST_F(MqttServerTest, Negative_Disconnect_Anytime) aitt::AittException); } -TEST_F(MqttServerTest, Positive_Disconnect_Anytime) +TEST_F(MqttServerTest, Disconnect_P_Anytime) { try { MqttServer server(webrtc_src_config_); @@ -187,7 +187,7 @@ TEST_F(MqttServerTest, Positive_Disconnect_Anytime) } } -TEST_F(MqttServerTest, Negative_Register_Anytime) +TEST_F(MqttServerTest, Register_N_Anytime) { EXPECT_THROW( { @@ -204,7 +204,7 @@ TEST_F(MqttServerTest, Negative_Register_Anytime) std::runtime_error); } -TEST_F(MqttServerTest, Negative_JoinRoom_Invalid_Parameter_Anytime) +TEST_F(MqttServerTest, JoinRoom_Invalid_Parameter_N_Anytime) { EXPECT_THROW( { @@ -238,7 +238,7 @@ static void joinRoomOnRegisteredQuit(IfaceServer::ConnectionState state, MqttSer } } -TEST_F(MqttServerTest, Positive_JoinRoom_Anytime) +TEST_F(MqttServerTest, JoinRoom_P_Anytime) { try { MqttServer server(webrtc_src_config_); @@ -302,7 +302,7 @@ static void onSinkMessage(const std::string &msg, MqttServer &server, GMainLoop } } -TEST_F(MqttServerTest, Positive_src_sink) +TEST_F(MqttServerTest, src_sink_P) { try { MqttServer src_server(webrtc_src_config_); @@ -336,7 +336,7 @@ TEST_F(MqttServerTest, Positive_src_sink) } } -TEST_F(MqttServerTest, Positive_sink_src) +TEST_F(MqttServerTest, sink_src_P) { try { MqttServer sink_server(webrtc_first_sink_config_); @@ -399,7 +399,7 @@ static void onSinkMessageDisconnect(const std::string &msg, MqttServer &server, } } -TEST_F(MqttServerTest, Positive_src_sink_disconnect_src_first_Anytime) +TEST_F(MqttServerTest, src_sink_disconnect_src_first_P_Anytime) { try { MqttServer src_server(webrtc_src_config_); @@ -433,7 +433,7 @@ TEST_F(MqttServerTest, Positive_src_sink_disconnect_src_first_Anytime) } } -TEST_F(MqttServerTest, Positive_sink_src_disconnect_src_first_Anytime) +TEST_F(MqttServerTest, sink_src_disconnect_src_first_P_Anytime) { try { MqttServer sink_server(webrtc_first_sink_config_); @@ -547,7 +547,7 @@ static void onSinkMessageThreeWay(const std::string &msg, MqttServer &server) } } -TEST_F(MqttServerTest, Positive_SendMessageThreeWay_Src_Sinks1_Anytime) +TEST_F(MqttServerTest, SendMessageThreeWay_Src_Sinks1_P_Anytime) { try { handled_sink = 0; diff --git a/tests/AITT_test.cc b/tests/AITT_test.cc index ec7b902..7befc01 100644 --- a/tests/AITT_test.cc +++ b/tests/AITT_test.cc @@ -236,7 +236,7 @@ class AITTTest : public testing::Test, public AittTests { } }; -TEST_F(AITTTest, Positive_Create_Anytime) +TEST_F(AITTTest, Create_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -306,7 +306,7 @@ TEST_F(AITTTest, UnsetConnectionCallback_P_Anytime) } } -TEST_F(AITTTest, Positive_Connect_Anytime) +TEST_F(AITTTest, Connect_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -316,7 +316,7 @@ TEST_F(AITTTest, Positive_Connect_Anytime) } } -TEST_F(AITTTest, Positive_Disconnect_Anytime) +TEST_F(AITTTest, Disconnect_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -327,7 +327,7 @@ TEST_F(AITTTest, Positive_Disconnect_Anytime) } } -TEST_F(AITTTest, Positive_Connect_twice_Anytime) +TEST_F(AITTTest, Connect_twice_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -339,7 +339,7 @@ TEST_F(AITTTest, Positive_Connect_twice_Anytime) } } -TEST_F(AITTTest, Positive_Publish_MQTT_Anytime) +TEST_F(AITTTest, Publish_MQTT_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -350,7 +350,7 @@ TEST_F(AITTTest, Positive_Publish_MQTT_Anytime) } } -TEST_F(AITTTest, Positive_Publish_TCP_Anytime) +TEST_F(AITTTest, Publish_TCP_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -361,7 +361,7 @@ TEST_F(AITTTest, Positive_Publish_TCP_Anytime) } } -TEST_F(AITTTest, Positive_Publish_SECURE_TCP_Anytime) +TEST_F(AITTTest, Publish_SECURE_TCP_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -372,7 +372,7 @@ TEST_F(AITTTest, Positive_Publish_SECURE_TCP_Anytime) } } -TEST_F(AITTTest, Positive_Publish_Multiple_Protocols_Anytime) +TEST_F(AITTTest, Publish_Multiple_Protocols_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -386,7 +386,7 @@ TEST_F(AITTTest, Positive_Publish_Multiple_Protocols_Anytime) } } -TEST_F(AITTTest, Positive_Subscribe_WebRTC_Anytime) +TEST_F(AITTTest, Subscribe_WebRTC_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -400,7 +400,7 @@ TEST_F(AITTTest, Positive_Subscribe_WebRTC_Anytime) } } -TEST_F(AITTTest, Positive_Unsubscribe_MQTT_Anytime) +TEST_F(AITTTest, Unsubscribe_MQTT_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -416,7 +416,7 @@ TEST_F(AITTTest, Positive_Unsubscribe_MQTT_Anytime) } } -TEST_F(AITTTest, Positive_Unsubscribe_TCP_Anytime) +TEST_F(AITTTest, Unsubscribe_TCP_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -432,7 +432,7 @@ TEST_F(AITTTest, Positive_Unsubscribe_TCP_Anytime) } } -TEST_F(AITTTest, Positive_Unsubscribe_SECURE_TCP_Anytime) +TEST_F(AITTTest, Unsubscribe_SECURE_TCP_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -448,7 +448,7 @@ TEST_F(AITTTest, Positive_Unsubscribe_SECURE_TCP_Anytime) } } -TEST_F(AITTTest, Positve_PublishSubscribe_MQTT_Anytime) +TEST_F(AITTTest, PublishSubscribe_MQTT_P_Anytime) { PubsubTemplate(TEST_MSG, AITT_TYPE_MQTT); } @@ -458,7 +458,7 @@ TEST_F(AITTTest, Positve_Publish_0_MQTT_Anytime) PubsubTemplate("", AITT_TYPE_MQTT); } -TEST_F(AITTTest, Positve_Unsubscribe_in_Subscribe_MQTT_Anytime) +TEST_F(AITTTest, Unsubscribe_in_Subscribe_MQTT_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -493,7 +493,7 @@ TEST_F(AITTTest, Positve_Unsubscribe_in_Subscribe_MQTT_Anytime) } } -TEST_F(AITTTest, Positve_Subscribe_in_Subscribe_MQTT_Anytime) +TEST_F(AITTTest, Subscribe_in_Subscribe_MQTT_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -542,27 +542,27 @@ TEST_F(AITTTest, Positve_Subscribe_in_Subscribe_MQTT_Anytime) } } -TEST_F(AITTTest, Positve_PublishSubscribe_TCP_Anytime) +TEST_F(AITTTest, PublishSubscribe_TCP_P_Anytime) { PubsubTemplate(TEST_MSG, AITT_TYPE_TCP); } -TEST_F(AITTTest, Positve_PublishSubscribe_SECURE_TCP_Anytime) +TEST_F(AITTTest, PublishSubscribe_SECURE_TCP_P_Anytime) { PubsubTemplate(TEST_MSG, AITT_TYPE_TCP_SECURE); } -TEST_F(AITTTest, Positve_Publish_0_TCP_Anytime) +TEST_F(AITTTest, Publish_0_TCP_P_Anytime) { PubsubTemplate("", AITT_TYPE_TCP); } -TEST_F(AITTTest, Positve_Publish_0_SECURE_TCP_Anytime) +TEST_F(AITTTest, Publish_0_SECURE_TCP_P_Anytime) { PubsubTemplate("", AITT_TYPE_TCP_SECURE); } -TEST_F(AITTTest, Positve_PublishSubscribe_Multiple_Protocols_Anytime) +TEST_F(AITTTest, PublishSubscribe_Multiple_Protocols_P_Anytime) { try { AITT aitt(clientId, LOCAL_IP, AittOption(true, false)); @@ -604,32 +604,32 @@ TEST_F(AITTTest, Positve_PublishSubscribe_Multiple_Protocols_Anytime) } } -TEST_F(AITTTest, Positve_PublishSubscribe_TCP_twice_Anytime) +TEST_F(AITTTest, PublishSubscribe_TCP_twice_P_Anytime) { PublishSubscribeTCPTwiceTemplate(AITT_TYPE_TCP); } -TEST_F(AITTTest, Positve_PublishSubscribe_SECURE_TCP_twice_Anytime) +TEST_F(AITTTest, PublishSubscribe_SECURE_TCP_twice_P_Anytime) { PublishSubscribeTCPTwiceTemplate(AITT_TYPE_TCP_SECURE); } -TEST_F(AITTTest, Positive_Subscribe_Retained_TCP_Anytime) +TEST_F(AITTTest, Subscribe_Retained_TCP_P_Anytime) { SubscribeRetainedTCPTemplate(AITT_TYPE_TCP); } -TEST_F(AITTTest, Positive_Subscribe_Retained_SECURE_TCP_Anytime) +TEST_F(AITTTest, Subscribe_Retained_SECURE_TCP_P_Anytime) { SubscribeRetainedTCPTemplate(AITT_TYPE_TCP_SECURE); } -TEST_F(AITTTest, TCP_Publish_Disconnect_TCP_Anytime) +TEST_F(AITTTest, Publish_Disconnect_TCP_P_Anytime) { PublishDisconnectTemplate(AITT_TYPE_TCP); } -TEST_F(AITTTest, TCP_Publish_Disconnect_SECURE_TCP_Anytime) +TEST_F(AITTTest, Publish_Disconnect_SECURE_TCP_P_Anytime) { PublishDisconnectTemplate(AITT_TYPE_TCP_SECURE); } diff --git a/tests/MosquittoMQ_mocktest.cc b/tests/MosquittoMQ_mocktest.cc index 21140a2..83fe685 100644 --- a/tests/MosquittoMQ_mocktest.cc +++ b/tests/MosquittoMQ_mocktest.cc @@ -33,7 +33,7 @@ using ::testing::Return; #define TEST_HOST "localhost" #define TEST_HANDLE reinterpret_cast<mosquitto *>(0xbeefbeef) -TEST_F(MQMockTest, Negative_Create_lib_init_Anytime) +TEST_F(MQMockTest, Create_lib_init_N_Anytime) { EXPECT_CALL(GetMock(), mosquitto_lib_init()).WillOnce(Return(MOSQ_ERR_NOT_SUPPORTED)); EXPECT_CALL(GetMock(), mosquitto_destroy(nullptr)).WillOnce(Return()); @@ -47,7 +47,7 @@ TEST_F(MQMockTest, Negative_Create_lib_init_Anytime) } } -TEST_F(MQMockTest, Negative_Create_new_Anytime) +TEST_F(MQMockTest, Create_new_N_Anytime) { EXPECT_CALL(GetMock(), mosquitto_lib_init()).WillOnce(Return(MOSQ_ERR_SUCCESS)); EXPECT_CALL(GetMock(), mosquitto_new(testing::StrEq(TEST_CLIENT_ID), true, testing::_)) @@ -63,7 +63,7 @@ TEST_F(MQMockTest, Negative_Create_new_Anytime) } } -TEST_F(MQMockTest, Positive_Publish_Anytime) +TEST_F(MQMockTest, Publish_P_Anytime) { EXPECT_CALL(GetMock(), mosquitto_lib_init()).WillOnce(Return(MOSQ_ERR_SUCCESS)); EXPECT_CALL(GetMock(), mosquitto_new(testing::StrEq(TEST_CLIENT_ID), true, testing::_)) @@ -90,7 +90,7 @@ TEST_F(MQMockTest, Positive_Publish_Anytime) } } -TEST_F(MQMockTest, Positive_Subscribe_Anytime) +TEST_F(MQMockTest, Subscribe_P_Anytime) { EXPECT_CALL(GetMock(), mosquitto_lib_init()).WillOnce(Return(MOSQ_ERR_SUCCESS)); EXPECT_CALL(GetMock(), mosquitto_new(testing::StrEq(TEST_CLIENT_ID), true, testing::_)) @@ -118,7 +118,7 @@ TEST_F(MQMockTest, Positive_Subscribe_Anytime) } } -TEST_F(MQMockTest, Positive_Unsubscribe_Anytime) +TEST_F(MQMockTest, Unsubscribe_P_Anytime) { EXPECT_CALL(GetMock(), mosquitto_lib_init()).WillOnce(Return(MOSQ_ERR_SUCCESS)); EXPECT_CALL(GetMock(), mosquitto_new(testing::StrEq(TEST_CLIENT_ID), true, testing::_)) @@ -150,7 +150,7 @@ TEST_F(MQMockTest, Positive_Unsubscribe_Anytime) } } -TEST_F(MQMockTest, Positive_Create_Anytime) +TEST_F(MQMockTest, Create_P_Anytime) { EXPECT_CALL(GetMock(), mosquitto_lib_init()).WillOnce(Return(MOSQ_ERR_SUCCESS)); EXPECT_CALL(GetMock(), mosquitto_new(testing::StrEq(TEST_CLIENT_ID), true, testing::_)) @@ -169,7 +169,7 @@ TEST_F(MQMockTest, Positive_Create_Anytime) } } -TEST_F(MQMockTest, Negative_Connect_will_set_Anytime) +TEST_F(MQMockTest, Connect_will_set_N_Anytime) { EXPECT_CALL(GetMock(), mosquitto_lib_init()).WillOnce(Return(MOSQ_ERR_SUCCESS)); EXPECT_CALL(GetMock(), mosquitto_new(testing::StrEq(TEST_CLIENT_ID), true, testing::_)) @@ -190,7 +190,7 @@ TEST_F(MQMockTest, Negative_Connect_will_set_Anytime) } } -TEST_F(MQMockTest, Positive_Connect_Anytime) +TEST_F(MQMockTest, Connect_P_Anytime) { EXPECT_CALL(GetMock(), mosquitto_lib_init()).WillOnce(Return(MOSQ_ERR_SUCCESS)); EXPECT_CALL(GetMock(), mosquitto_new(testing::StrEq(TEST_CLIENT_ID), true, testing::_)) @@ -208,7 +208,7 @@ TEST_F(MQMockTest, Positive_Connect_Anytime) } } -TEST_F(MQMockTest, Positive_Connect_User_Anytime) +TEST_F(MQMockTest, Connect_User_P_Anytime) { std::string username = "test"; std::string password = "test"; @@ -231,7 +231,7 @@ TEST_F(MQMockTest, Positive_Connect_User_Anytime) } } -TEST_F(MQMockTest, Positive_Disconnect_Anytime) +TEST_F(MQMockTest, Disconnect_P_Anytime) { EXPECT_CALL(GetMock(), mosquitto_lib_init()).WillOnce(Return(MOSQ_ERR_SUCCESS)); EXPECT_CALL(GetMock(), mosquitto_new(testing::StrEq(TEST_CLIENT_ID), true, testing::_)) diff --git a/tests/aitt_c_manualtest.cc b/tests/aitt_c_manualtest.cc index e8e0e5c..d8b7c25 100644 --- a/tests/aitt_c_manualtest.cc +++ b/tests/aitt_c_manualtest.cc @@ -20,6 +20,8 @@ #include "AittTests.h" +#define TEST_C_WILL_TOPIC "test/topic_will" + TEST(AITT_C_MANUAL, will_set_P) { int ret; @@ -33,11 +35,11 @@ TEST(AITT_C_MANUAL, will_set_P) GMainLoop *loop = g_main_loop_new(nullptr, FALSE); aitt_sub_h sub_handle = nullptr; ret = aitt_subscribe( - handle, "test/topic_will", + handle, TEST_C_WILL_TOPIC, [](aitt_msg_h msg_handle, const void *msg, size_t msg_len, void *user_data) { std::string received_data((const char *)msg, msg_len); EXPECT_STREQ(received_data.c_str(), TEST_C_MSG); - EXPECT_STREQ(aitt_msg_get_topic(msg_handle), TEST_C_TOPIC); + EXPECT_STREQ(aitt_msg_get_topic(msg_handle), TEST_C_WILL_TOPIC); sub_called = true; }, loop, &sub_handle); @@ -49,7 +51,7 @@ TEST(AITT_C_MANUAL, will_set_P) aitt_h handle_will = aitt_new("test_will", nullptr); ASSERT_NE(handle_will, nullptr); - ret = aitt_will_set(handle_will, "test/topic_will", TEST_C_MSG, strlen(TEST_C_MSG), + ret = aitt_will_set(handle_will, TEST_C_WILL_TOPIC, TEST_C_MSG, strlen(TEST_C_MSG), AITT_QOS_AT_LEAST_ONCE, false); ASSERT_EQ(ret, AITT_ERROR_NONE); diff --git a/tools/FlexbufPrinter.cc b/tools/FlexbufPrinter.cc index 339a9cd..04e9d80 100644 --- a/tools/FlexbufPrinter.cc +++ b/tools/FlexbufPrinter.cc @@ -77,9 +77,10 @@ void FlexbufPrinter::PrettyVector(const flexbuffers::Reference &data, bool inlin void FlexbufPrinter::PrettyBlob(const flexbuffers::Reference &data, bool inline_value) { auto blob = data.AsBlob(); - auto root = flexbuffers::GetRoot(static_cast<const uint8_t *>(blob.data()), blob.size()); + DBG_HEX_DUMP(blob.data(), blob.size()); + // auto root = flexbuffers::GetRoot(static_cast<const uint8_t *>(blob.data()), blob.size()); - PrettyParsing(root, true); + // PrettyParsing(root, true); } void FlexbufPrinter::PrettyParsing(const flexbuffers::Reference &data, bool inline_value) |