asdfuser pushed a commit to branch master.
commit 1a8fcf81a06ad569ebd83a16a8c7c21d32dff442
Author: Daniel Willmann <[email protected]>
Date: Fri Apr 26 18:46:55 2013 +0100
ecore_audio: Test the looped signal/code path as well
Signed-off-by: Daniel Willmann <[email protected]>
---
src/tests/ecore/ecore_test_ecore_audio.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c
b/src/tests/ecore/ecore_test_ecore_audio.c
index 8c6623c..c1e3e26 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -307,7 +307,14 @@ static Eina_Bool _finished_cb(void *data EINA_UNUSED, Eo
*obj EINA_UNUSED, const
{
ecore_main_loop_quit();
- return EINA_FALSE;
+ return EINA_TRUE;
+}
+
+static Eina_Bool _looped_cb(void *data EINA_UNUSED, Eo *obj, const
Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+ eo_do(obj, ecore_audio_obj_in_looped_set(EINA_FALSE));
+
+ return EINA_TRUE;
}
START_TEST(ecore_test_ecore_audio_obj_tone)
@@ -333,6 +340,8 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
eo_do(in, ecore_audio_obj_in_length_get(&len));
fail_if(len != 2.5);
+ eo_do(in, ecore_audio_obj_in_looped_set(EINA_TRUE));
+
eo_do(in, ecore_audio_obj_in_remaining_get(&len));
fail_if(len != 2.5);
@@ -375,6 +384,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
eo_do(out, ecore_audio_obj_out_input_attach(in, &ret));
fail_if(!ret);
+ eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_LOOPED, _looped_cb,
NULL));
eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_STOPPED, _finished_cb,
NULL));
ecore_main_loop_begin();
--
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr