--- /dev/null
+#include <check.h>
+#define EFL_BETA_API_SUPPORT
+#include <Elementary.h>
+Evas_Object *main_win = NULL;
+Evas_Object *label = NULL;
+
+/**
+ * @addtogroup elm_atspi
+ * @{
+ * @defgroup elm_atspi_accessible_relationships_clear elm_atspi_accessible_relationships_clear()
+ *
+ * @precondition
+ * @step 1 Initialize Elementary
+ * @step 2 Create and show main window
+ */
+
+static void
+setup(void)
+{
+ printf(" ============ Startup ============ \n");
+ elm_init(0, NULL);
+ main_win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Unable to create a main window..", __FILE__, __LINE__);
+ }
+ label = elm_label_add(main_win);
+ evas_object_show(main_win);
+ evas_object_show(label);
+}
+
+static void
+teardown(void)
+{
+ if (main_win != NULL)
+ {
+ evas_object_del(main_win);
+ main_win = NULL;
+ }
+
+ elm_shutdown();
+ printf(" ============ Cleanup ============ \n");
+}
+
+/**
+ * @addtogroup elm_atspi_accessible_relationships_clear
+ * @{
+ * @objective Positive test case checks if relationships clear works properly
+ * @n Input Data:
+ * @li pointer to elm_button object.
+ *
+ * @procedure
+ * @step 1 Set text on elm_button with elm_object_text_set.
+ * @step 2 Append 2 new relations with elm_atspi_accessible_relationship_append.
+ * @step 3 Call elm_atspi_accessible_relation_set_get and check result.
+ * @step 4 Call elm_atspi_accessible_relationships_clear() for clear relation.
+ * @step 5 Call elm_atspi_accessible_relation_set_get for check NULL relation.
+ *
+ * @passcondition
+ * @li Test passes if all comprarisons pass and there is no segmentation fault
+ * @}
+ */
+START_TEST(utc_elm_atspi_accessible_relationships_clear_p)
+{
+ if (main_win == NULL)
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__);
+ }
+
+ Evas_Object *btn = NULL;
+
+ btn = elm_button_add(main_win);
+ elm_object_text_set(btn, "Other text");
+
+ if (!elm_atspi_accessible_relationship_append(btn, ELM_ATSPI_RELATION_FLOWS_TO, label))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__);
+ }
+ if (!elm_atspi_accessible_relationship_append(btn, ELM_ATSPI_RELATION_FLOWS_FROM, main_win))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__);
+ }
+ if (!elm_atspi_accessible_relation_set_get(btn))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__);
+ }
+
+ elm_atspi_accessible_relationships_clear(btn);
+
+ if (elm_atspi_accessible_relation_set_get(btn))
+ {
+ ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__,__LINE__);
+ }
+
+ printf("[TEST_PASS]:: %s[%d] : Test has passed..\n", __FILE__, __LINE__);
+}
+END_TEST
+
+/**
+ *@}
+ */
+Suite *
+test_suite(void)
+{
+ Suite *suite = suite_create("utc_elm_atspi_accessible_relationships_clear");
+
+ TCase *tcase = tcase_create("TCase");
+ tcase_set_timeout(tcase, 30);
+ tcase_add_checked_fixture(tcase, setup, teardown);
+ tcase_add_test(tcase, utc_elm_atspi_accessible_relationships_clear_p);
+ suite_add_tcase(suite, tcase);
+
+ return suite;
+}
+
+int
+main()
+{
+ int number_failed;
+
+ Suite *suite = test_suite();
+ SRunner *srunner = srunner_create(suite);
+ srunner_set_log(srunner, "utc_elm_atspi_accessible_relationships_clear.log");
+ srunner_set_xml(srunner, "utc_elm_atspi_accessible_relationships_clear.xml");
+ srunner_run_all(srunner, CK_NORMAL);
+ number_failed = srunner_ntests_failed(srunner);
+ srunner_free(srunner);
+
+ return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}