revise client test case accepted/tizen/unified/20200406.074345 submit/tizen/20200406.072047
authorYoungjae Shin <yj99.shin@samsung.com>
Thu, 2 Apr 2020 04:30:22 +0000 (13:30 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Thu, 2 Apr 2020 04:34:47 +0000 (13:34 +0900)
unittest/modes_test_client.cpp

index 5b024c110566c99af8f64d0fbe5a24e769133c23..66f76e1f9531fded5de191802a1e0459175009ce 100644 (file)
@@ -17,7 +17,9 @@
 #include <glib.h>
 #include <gtest/gtest.h>
 #include <modes.h>
+#include "common/definitions.h"
 
+#define CREATED_MODE_NAME "created"
 class ClientTest : public ::testing::Test {
 protected:
        void SetUp() override
@@ -55,7 +57,7 @@ protected:
 
        static gboolean registerModeIdler(gpointer data)
        {
-               modes_mode_h created_mode = modes_create_mode("created", MODES_TYPE_MODE_NORMAL);
+               modes_mode_h created_mode = modes_create_mode(CREATED_MODE_NAME, MODES_TYPE_MODE_NORMAL);
                modes_action_h action_handle[2];
                action_handle[0] = modes_create_action("test.printBool", "on");
                action_handle[1] = modes_create_action("test.printBool", "off");
@@ -117,6 +119,7 @@ TEST_F(ClientTest, registerMode)
        g_idle_add(registerModeIdler, NULL);
        g_main_loop_run(loop);
        EXPECT_EQ(MODES_ERROR_NONE, result);
+       remove(MODES_CUSTOM_MODE_DEFAULT_DIR "/tizen_" CREATED_MODE_NAME "_mode.xml");
 }
 
 TEST_F(ClientTest, undoModeEx1)