summaryrefslogtreecommitdiff
path: root/src/tests/ecore
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-25 15:32:53 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-01-26 11:42:12 +0100
commit015fbac20da75fa944573c8f359b0785c7ffedbd (patch)
treebba605f072b44139b151077407fa1335170a048f /src/tests/ecore
parentdb13fbc4940ee619b1edf47e6bbb745b769a7dcb (diff)
ecore: make ecore_audio_out abstract
ecore_audio does define format and source, those are then used in some leave classes, ecore_audio is only used in the tests, and should not be used externally. Therefore make it abstract. The other missing implementations are in the leave classes, They are resolved with providing empty implementations, since no format switching is supported. ref T5719 Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7782
Diffstat (limited to 'src/tests/ecore')
-rw-r--r--src/tests/ecore/ecore_audio_out_test.eo8
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c9
-rw-r--r--src/tests/ecore/meson.build19
3 files changed, 33 insertions, 3 deletions
diff --git a/src/tests/ecore/ecore_audio_out_test.eo b/src/tests/ecore/ecore_audio_out_test.eo
new file mode 100644
index 0000000000..a5ec9218d7
--- /dev/null
+++ b/src/tests/ecore/ecore_audio_out_test.eo
@@ -0,0 +1,8 @@
1class Ecore.Audio.Out.Test extends Ecore.Audio.Out
2{
3 data: null;
4 implements {
5 @empty Ecore.Audio.source { set; get; }
6 @empty Ecore.Audio.format { set; get; }
7 }
8}
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index c90d575eea..9c8a890945 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -311,6 +311,9 @@ EFL_START_TEST(ecore_test_ecore_audio_obj_sndfile)
311} 311}
312EFL_END_TEST 312EFL_END_TEST
313 313
314#include "ecore_audio_out_test.eo.h"
315#include "ecore_audio_out_test.eo.c"
316
314EFL_START_TEST(ecore_test_ecore_audio_obj_in_out) 317EFL_START_TEST(ecore_test_ecore_audio_obj_in_out)
315{ 318{
316 Eo *out2; 319 Eo *out2;
@@ -319,7 +322,7 @@ EFL_START_TEST(ecore_test_ecore_audio_obj_in_out)
319 322
320 Eo *in = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL); 323 Eo *in = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
321 Eo *in2 = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL); 324 Eo *in2 = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
322 Eo *out = efl_add_ref(ECORE_AUDIO_OUT_CLASS, NULL); 325 Eo *out = efl_add_ref(ECORE_AUDIO_OUT_TEST_CLASS, NULL);
323 326
324 fail_if(!in); 327 fail_if(!in);
325 fail_if(!in2); 328 fail_if(!in2);
@@ -418,7 +421,7 @@ EFL_START_TEST(ecore_test_ecore_audio_obj_vio)
418 in = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL); 421 in = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
419 fail_if(!in); 422 fail_if(!in);
420 423
421 out = efl_add_ref(ECORE_AUDIO_OUT_CLASS, NULL); 424 out = efl_add_ref(ECORE_AUDIO_OUT_TEST_CLASS, NULL);
422 fail_if(!out); 425 fail_if(!out);
423 426
424 ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL); 427 ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL);
@@ -543,7 +546,7 @@ EFL_START_TEST(ecore_test_ecore_audio_obj)
543 objs[0] = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL); 546 objs[0] = efl_add_ref(ECORE_AUDIO_IN_CLASS, NULL);
544 fail_if(!objs[0]); 547 fail_if(!objs[0]);
545 548
546 objs[1] = efl_add_ref(ECORE_AUDIO_OUT_CLASS, NULL); 549 objs[1] = efl_add_ref(ECORE_AUDIO_OUT_TEST_CLASS, NULL);
547 fail_if(!objs[1]); 550 fail_if(!objs[1]);
548 551
549 for (i=0; i<2; i++) { 552 for (i=0; i<2; i++) {
diff --git a/src/tests/ecore/meson.build b/src/tests/ecore/meson.build
index 98104146be..4b46814bbe 100644
--- a/src/tests/ecore/meson.build
+++ b/src/tests/ecore/meson.build
@@ -23,9 +23,28 @@ ecore_suite_deps += ecore_evas
23ecore_suite_deps += ecore_input 23ecore_suite_deps += ecore_input
24ecore_suite_deps += ecore_imf 24ecore_suite_deps += ecore_imf
25 25
26test_eo_files = [
27 'ecore_audio_out_test.eo',
28]
29test_eo_file_target = []
30
31foreach eo_file : test_eo_files
32 test_eo_file_target += custom_target('eolian_gen_' + eo_file,
33 input : eo_file,
34 output : [eo_file + '.h'],
35 depfile : eo_file + '.d',
36 install : false,
37 command : eolian_gen + [ '-I', meson.current_source_dir(), eolian_include_directories,
38 '-o', 'h:' + join_paths(meson.current_build_dir(), eo_file + '.h'),
39 '-o', 'c:' + join_paths(meson.current_build_dir(), eo_file + '.c'),
40 '-o', 'd:' + join_paths(meson.current_build_dir(), eo_file + '.d'),
41 '-gchd', '@INPUT@'])
42endforeach
43
26if get_option('audio') 44if get_option('audio')
27 ecore_suite_deps += ecore_audio 45 ecore_suite_deps += ecore_audio
28 ecore_suite_src += 'ecore_test_ecore_audio.c' 46 ecore_suite_src += 'ecore_test_ecore_audio.c'
47 ecore_suite_src += test_eo_file_target
29endif 48endif
30 49
31if get_option('fb') 50if get_option('fb')