summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_audio.c
diff options
context:
space:
mode:
authorDaniel Willmann <d.willmann@samsung.com>2013-04-29 18:24:53 +0100
committerDaniel Willmann <d.willmann@samsung.com>2013-04-29 19:57:16 +0100
commitbafa8f0ae627706d639d8506316fc3824c387ef4 (patch)
tree786dae52708e219ee0cc4e0c1322186bff936ecd /src/tests/ecore/ecore_test_ecore_audio.c
parent108509c3f835ac184fe46567004ac987dedddc53 (diff)
ecore_audio: Test VIO unsetting and freeing
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore_audio.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index 271d0ea..ec52973 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -546,6 +546,13 @@ START_TEST(ecore_test_ecore_audio_obj_vio)
546} 546}
547END_TEST 547END_TEST
548 548
549static void _myfree(void *data)
550{
551 Eina_Bool *freed = data;
552
553 *freed = EINA_TRUE;
554}
555
549START_TEST(ecore_test_ecore_audio_obj_in) 556START_TEST(ecore_test_ecore_audio_obj_in)
550{ 557{
551 int i; 558 int i;
@@ -556,10 +563,19 @@ START_TEST(ecore_test_ecore_audio_obj_in)
556 ssize_t read; 563 ssize_t read;
557 uint8_t buf[10]; 564 uint8_t buf[10];
558 565
566 Ecore_Audio_Vio vio;
567 Eina_Bool freed = EINA_FALSE;
568
559 Eo *in = eo_add(ECORE_AUDIO_OBJ_IN_CLASS, NULL); 569 Eo *in = eo_add(ECORE_AUDIO_OBJ_IN_CLASS, NULL);
560 570
561 fail_if(!in); 571 fail_if(!in);
562 572
573 fail_if(!eo_do(in, ecore_audio_obj_vio_set(&vio, &freed, _myfree)));
574 fail_if(freed);
575
576 fail_if(!eo_do(in, ecore_audio_obj_vio_set(NULL, NULL, NULL)));
577 fail_if(!freed);
578
563 fail_if(!eo_do(in, ecore_audio_obj_in_speed_get(&speed))); 579 fail_if(!eo_do(in, ecore_audio_obj_in_speed_get(&speed)));
564 fail_if(speed != 1.0); 580 fail_if(speed != 1.0);
565 581