summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_evas.c
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-01-14 00:09:49 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2016-01-14 11:35:09 +0100
commit4fad2ce0fe5bef6e9af6f3e9f4ae8fb45854ac41 (patch)
treec6b0c4e7f20b15929355c9b3c726eb3f4e7119a7 /src/tests/ecore/ecore_test_ecore_evas.c
parent5aa49cb218cc4b915ef1ac44cdba05409e9ec08e (diff)
ecore_evas/tests: add tests for Ecore_Evas_Cocoa
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore_evas.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore_evas.c35
1 files changed, 35 insertions, 0 deletions
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)
36} 36}
37END_TEST 37END_TEST
38 38
39START_TEST(ecore_test_ecore_evas_cocoa)
40{
41 int ret;
42 Ecore_Evas *ee;
43 Ecore_Cocoa_Window *win;
44
45 ret = ecore_evas_init();
46 fail_if(ret != 1);
47
48 ret = ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_OPENGL_COCOA);
49 if (ret == EINA_TRUE)
50 {
51 /* Engine supported. Shall not fail... */
52 ee = ecore_evas_cocoa_new(NULL, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
53 fail_if(ee == NULL);
54 win = ecore_evas_cocoa_window_get(ee);
55 fail_if(win == NULL);
56 }
57 else
58 {
59 /* Engine not supported. Shall not succeed... */
60 ee = ecore_evas_cocoa_new(NULL, 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
61 fail_if(ee != NULL);
62 win = ecore_evas_cocoa_window_get(ee);
63 fail_if(win != NULL);
64 }
65
66 ecore_evas_free(ee);
67
68 ret = ecore_evas_shutdown();
69 fail_if(ret != 0);
70}
71END_TEST
72
39void ecore_test_ecore_evas(TCase *tc) 73void ecore_test_ecore_evas(TCase *tc)
40{ 74{
41 tcase_add_test(tc, ecore_test_ecore_evas_associate); 75 tcase_add_test(tc, ecore_test_ecore_evas_associate);
76 tcase_add_test(tc, ecore_test_ecore_evas_cocoa);
42} 77}