summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_audio.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-05-17 16:08:28 +0100
committerTom Hacohen <tom@stosb.com>2016-05-17 16:23:23 +0100
commit546ff7bbba788ec834c5608361c0834853f2d5d7 (patch)
tree72f867c3bbb79d0684d0bd2bf9785aa859c3ff7b /src/tests/ecore/ecore_test_ecore_audio.c
parente9c4e7bf76513f2a2d110b93b3cced36318b6d14 (diff)
Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer, now you just always eo_unref() to delete an object. This change makes it so the reference of the parent is shared with the reference the programmer has. So eo_parent_set(obj, NULL) can free an object, and so does eo_unref() (even if there is a parent). This means Eo no longer complains if you have a parent during deletion.
Diffstat (limited to '')
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index 0240903e0b..e3410ae573 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -83,8 +83,8 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
83 ecore_main_loop_begin(); 83 ecore_main_loop_begin();
84 fail_if(pulse_context_failed); 84 fail_if(pulse_context_failed);
85 85
86 eo_del(out); 86 eo_unref(out);
87 eo_del(in); 87 eo_unref(in);
88} 88}
89END_TEST 89END_TEST
90#endif 90#endif
@@ -100,7 +100,7 @@ static Eina_Bool
100_idle_del(void *data) 100_idle_del(void *data)
101{ 101{
102 Eo *in = data; 102 Eo *in = data;
103 eo_del(in); 103 eo_unref(in);
104 ecore_idler_add(_quit, NULL); 104 ecore_idler_add(_quit, NULL);
105 105
106 return EINA_FALSE; 106 return EINA_FALSE;
@@ -218,8 +218,8 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
218 218
219 ecore_main_loop_begin(); 219 ecore_main_loop_begin();
220 220
221 eo_del(in); 221 eo_unref(in);
222 eo_del(out); 222 eo_unref(out);
223 223
224 //TODO: Compare and fail 224 //TODO: Compare and fail
225 ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav"); 225 ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav");
@@ -308,8 +308,8 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
308 308
309 ecore_main_loop_begin(); 309 ecore_main_loop_begin();
310 310
311 eo_del(in); 311 eo_unref(in);
312 eo_del(out); 312 eo_unref(out);
313 313
314 //TODO: Compare and fail 314 //TODO: Compare and fail
315 ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav"); 315 ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav");
@@ -361,20 +361,20 @@ START_TEST(ecore_test_ecore_audio_obj_in_out)
361 fail_if(eina_list_count(in3) != 2); 361 fail_if(eina_list_count(in3) != 2);
362 fail_if(eina_list_data_get(in3) != in); 362 fail_if(eina_list_data_get(in3) != in);
363 363
364 eo_del(in2); 364 eo_unref(in2);
365 365
366 in3 = ecore_audio_obj_out_inputs_get(out); 366 in3 = ecore_audio_obj_out_inputs_get(out);
367 367
368 fail_if(eina_list_count(in3) != 1); 368 fail_if(eina_list_count(in3) != 1);
369 fail_if(eina_list_data_get(in3) != in); 369 fail_if(eina_list_data_get(in3) != in);
370 370
371 eo_del(out); 371 eo_unref(out);
372 372
373 out2 = ecore_audio_obj_in_output_get(in); 373 out2 = ecore_audio_obj_in_output_get(in);
374 374
375 fail_if(out2); 375 fail_if(out2);
376 376
377 eo_del(in); 377 eo_unref(in);
378} 378}
379END_TEST 379END_TEST
380 380
@@ -433,8 +433,8 @@ START_TEST(ecore_test_ecore_audio_obj_vio)
433 433
434 ecore_main_loop_begin(); 434 ecore_main_loop_begin();
435 435
436 eo_del(out); 436 eo_unref(out);
437 eo_del(in); 437 eo_unref(in);
438} 438}
439END_TEST 439END_TEST
440 440
@@ -533,7 +533,7 @@ START_TEST(ecore_test_ecore_audio_obj_in)
533 fail_if(buf[i] != 0x00); 533 fail_if(buf[i] != 0x00);
534 } 534 }
535 535
536 eo_del(in); 536 eo_unref(in);
537} 537}
538END_TEST 538END_TEST
539 539
@@ -581,7 +581,7 @@ START_TEST(ecore_test_ecore_audio_obj)
581 volume = ecore_audio_obj_volume_get(obj); 581 volume = ecore_audio_obj_volume_get(obj);
582 fail_if(volume != 0.5); 582 fail_if(volume != 0.5);
583 583
584 eo_del(obj); 584 eo_unref(obj);
585 } 585 }
586 586
587} 587}