ecore_con: Update ecore_con_shutdown test
authorse.osadchy <se.osadchy@samsung.com>
Tue, 25 Apr 2017 08:57:40 +0000 (11:57 +0300)
committerse.osadchy <se.osadchy@samsung.com>
Tue, 25 Apr 2017 08:58:24 +0000 (11:58 +0300)
Change-Id: If4c51792bd9a764ee3ced6a05b23c57065f01897
Signed-off-by: Sergey Osadchy <se.osadchy@samsung.com>
TC/ecore/ecore_con/utc_ecore_con_shutdown.c

index 6aa03a884f77d8f9cdd7939983c95b4c39a28d36..d31f677953d0dab508a4ef85dff54e4a7e394506 100644 (file)
@@ -106,6 +106,40 @@ START_TEST(utc_ecore_con_shutdown_p2)
      }
 }
 END_TEST
+
+/**
+ * @addtogroup ecore_con_shutdown
+ * @{
+ * @objective The negative test case checks that tested function finalizes Ecore_Con
+ * library and returns correct value if Ecore_Con library not was initialized.
+ * @n Input Data: none.
+ *
+ * @procedure
+ * @step 1 Call ecore_con_shutdown() three times for finalization ecore_con library.
+ * @step 2 Check the value returned by ecore_con_shutdown(); it must be 0.
+ *
+ * @passcondition
+ * Tested function must return 0, and there is no segmentation fault.
+ * @}
+ */
+
+START_TEST(utc_ecore_con_shutdown_n)
+{
+   int n;
+
+   ecore_con_shutdown();
+   ecore_con_shutdown();
+   n = ecore_con_shutdown();
+
+   if (n != 0)
+     {
+        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
+
 /**
  *@}
  */
@@ -119,6 +153,7 @@ test_suite(void)
    tcase_add_checked_fixture(tcase, setup, teardown);
    tcase_add_test(tcase, utc_ecore_con_shutdown_p);
    tcase_add_test(tcase, utc_ecore_con_shutdown_p2);
+   tcase_add_test(tcase, utc_ecore_con_shutdown_n);
    suite_add_tcase(suite, tcase);
 
    return suite;