summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore.c
diff options
context:
space:
mode:
authorValerii Kanunik <v.kanunik@samsung.com>2013-04-12 10:27:22 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-04-12 10:46:47 +0900
commit4c992a4f85b63176c6e9d74ef89e924cf4f61a5f (patch)
tree541d856818b82b3564af2c2fb481081567149309 /src/tests/ecore/ecore_test_ecore.c
parent45fdd4574e313986cd11766c4addc60b00e08393 (diff)
ecore: Added tests for ecore_app_args procedures.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/tests/ecore/ecore_test_ecore.c b/src/tests/ecore/ecore_test_ecore.c
index 357ad007bb..aca7b2c713 100644
--- a/src/tests/ecore/ecore_test_ecore.c
+++ b/src/tests/ecore/ecore_test_ecore.c
@@ -351,6 +351,34 @@ START_TEST(ecore_test_ecore_main_loop_event_recursive)
351} 351}
352END_TEST 352END_TEST
353 353
354START_TEST(ecore_test_ecore_app)
355{
356 int ret;
357
358 int argc_in = 2;
359 const char *argv_in[] = {"arg_str_1", "arg_str2"};
360
361 int argc_out = 0;
362 char **argv_out = NULL;
363
364 ret = ecore_init();
365 fail_if(ret != 1);
366
367 ecore_app_args_set(argc_in, argv_in);
368 ecore_app_args_get(&argc_out, &argv_out);
369
370 fail_if(argc_in != argc_out);
371 int i;
372 for (i = 0; i < argc_out; i++)
373 {
374 fail_if( 0 != strcmp(argv_in[i], argv_out[i]) );
375 }
376
377 ret = ecore_shutdown();
378 fail_if(ret != 0);
379}
380END_TEST
381
354void ecore_test_ecore(TCase *tc) 382void ecore_test_ecore(TCase *tc)
355{ 383{
356 tcase_add_test(tc, ecore_test_ecore_init); 384 tcase_add_test(tc, ecore_test_ecore_init);
@@ -363,4 +391,5 @@ void ecore_test_ecore(TCase *tc)
363 tcase_add_test(tc, ecore_test_ecore_main_loop_event); 391 tcase_add_test(tc, ecore_test_ecore_main_loop_event);
364 tcase_add_test(tc, ecore_test_ecore_main_loop_timer_inner); 392 tcase_add_test(tc, ecore_test_ecore_main_loop_timer_inner);
365 tcase_add_test(tc, ecore_test_ecore_main_loop_event_recursive); 393 tcase_add_test(tc, ecore_test_ecore_main_loop_event_recursive);
394 tcase_add_test(tc, ecore_test_ecore_app);
366} 395}