stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4fad2ce0fe5bef6e9af6f3e9f4ae8fb45854ac41

commit 4fad2ce0fe5bef6e9af6f3e9f4ae8fb45854ac41
Author: Jean Guyomarc'h <jean.guyoma...@gmail.com>
Date:   Thu Jan 14 00:09:49 2016 +0100

    ecore_evas/tests: add tests for Ecore_Evas_Cocoa
---
 src/tests/ecore/ecore_test_ecore_evas.c | 35 +++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/src/tests/ecore/ecore_test_ecore_evas.c 
b/src/tests/ecore/ecore_test_ecore_evas.c
index 2ed349e..a9e97c0 100644
--- a/src/tests/ecore/ecore_test_ecore_evas.c
+++ b/src/tests/ecore/ecore_test_ecore_evas.c
@@ -36,7 +36,42 @@ START_TEST(ecore_test_ecore_evas_associate)
 }
 END_TEST
 
+START_TEST(ecore_test_ecore_evas_cocoa)
+{
+   int ret;
+   Ecore_Evas *ee;
+   Ecore_Cocoa_Window *win;
+
+   ret = ecore_evas_init();
+   fail_if(ret != 1);
+
+   ret = ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_COCOA);
+   if (ret == EINA_TRUE)
+     {
+        /* Engine supported. Shall not fail... */
+        ee = ecore_evas_cocoa_new(NULL, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
+        fail_if(ee == NULL);
+        win = ecore_evas_cocoa_window_get(ee);
+        fail_if(win == NULL);
+     }
+   else
+     {
+        /* Engine not supported. Shall not succeed... */
+        ee = ecore_evas_cocoa_new(NULL, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
+        fail_if(ee != NULL);
+        win = ecore_evas_cocoa_window_get(ee);
+        fail_if(win != NULL);
+     }
+
+   ecore_evas_free(ee);
+
+   ret = ecore_evas_shutdown();
+   fail_if(ret != 0);
+}
+END_TEST
+
 void ecore_test_ecore_evas(TCase *tc)
 {
    tcase_add_test(tc, ecore_test_ecore_evas_associate);
+   tcase_add_test(tc, ecore_test_ecore_evas_cocoa);
 }

-- 


Reply via email to