Eet: update test for eet_data_image_encode_cipher by adding vary of lossy
authorArtem Popov <artem.popov@samsung.com>
Fri, 14 Apr 2017 17:22:56 +0000 (20:22 +0300)
committerArtem Popov <artem.popov@samsung.com>
Fri, 14 Apr 2017 17:23:10 +0000 (20:23 +0300)
Change-Id: Ie63f8e312247c467058c635438a41a8b5a2510fb
Signed-off-by: Artem Popov <artem.popov@samsung.com>
TC/eet/eet_image/utc_eet_data_image_encode_cipher.c

index 2d041820fe672eee62f31078e75dd60fad3f3479..72e30f2846dd47e39d8d1eca9fd0e2d17092a397 100644 (file)
@@ -63,8 +63,12 @@ teardown(void)
  * @objective Positive test case 01
  * Test case checks if the function is invoked successfully.
  * @procedure
- * @step 1 Encode image data.
+ * @step 1 Encode image data (lossless).
  * @step 2 Check the value returned if it is not NULL.
+ * @step 3 Encode image data (jpeg).
+ * @step 4 Check the value returned if it is not NULL.
+ * @step 5 Encode image data (etc1_alpha or rgba).
+ * @step 6 Check the value returned if it is not NULL.
  *
  * @passcondition  :   API Executes successfully, returning non-NULL value
  * @}
@@ -75,12 +79,27 @@ START_TEST(utc_eet_data_image_encode_cipher_p)
    void* ret = NULL;
    int size;
 
-   ret = eet_data_image_encode_cipher(test_noalpha.color, NULL, test_noalpha.w, test_noalpha.h, test_noalpha.alpha, 9, 100, 0, &size);
+   ret = eet_data_image_encode_cipher(test_noalpha.color, NULL, test_noalpha.w, test_noalpha.h, test_noalpha.alpha, 9, 100, EET_IMAGE_LOSSLESS, &size);
 
    if (ret == NULL)
      {
         ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
      }
+
+   ret = eet_data_image_encode_cipher(test_noalpha.color, NULL, test_noalpha.w, test_noalpha.h, test_noalpha.alpha, 9, 100, EET_IMAGE_JPEG, &size);
+
+   if (ret == NULL)
+     {
+        ck_abort_msg("[TEST_FAIL]:: %s[%d] : Test has failed..", __FILE__, __LINE__);
+     }
+
+   ret = eet_data_image_encode_cipher(test_noalpha.color, NULL, test_noalpha.w, test_noalpha.h, test_noalpha.alpha, 9, 100, EET_IMAGE_ETC1_ALPHA, &size);
+
+   if (ret == NULL)
+     {
+        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