summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-04-02 11:42:00 +0100
committerTom Hacohen <tom@stosb.com>2014-04-10 04:20:21 +0100
commit374af9b9cad96e499cfd9d3de99b30d2096d8cab (patch)
treec989a4dff16d1e7900030e1a1103afa406edb0a0 /src/tests
parent1866909ba1084d1b2cbcd324c9c8a81ab80405f0 (diff)
Eo: eo_base's data_*->key_data_*.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c12
-rw-r--r--src/tests/eo/composite_objects/composite_objects_comp.c2
-rw-r--r--src/tests/eo/composite_objects/composite_objects_main.c2
-rw-r--r--src/tests/eo/signals/signals_simple.c2
-rw-r--r--src/tests/eo/suite/eo_test_general.c52
5 files changed, 35 insertions, 35 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index d62838422e..04782ce916 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -116,7 +116,7 @@ START_TEST(ecore_test_ecore_audio_cleanup)
116 116
117 in = eo_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL); 117 in = eo_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL);
118 fail_if(!in); 118 fail_if(!in);
119 eo_do(in, eo_base_data_set(ECORE_AUDIO_ATTR_TONE_FREQ, &freq, NULL)); 119 eo_do(in, eo_key_data_set(ECORE_AUDIO_ATTR_TONE_FREQ, &freq, NULL));
120 eo_do(in, ecore_audio_obj_in_length_set(2)); 120 eo_do(in, ecore_audio_obj_in_length_set(2));
121 121
122 out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL); 122 out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
@@ -166,17 +166,17 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
166 eo_do(in, ecore_audio_obj_in_remaining_get(&len)); 166 eo_do(in, ecore_audio_obj_in_remaining_get(&len));
167 fail_if(len != 2.5); 167 fail_if(len != 2.5);
168 168
169 eo_do(in, eo_base_data_get(ECORE_AUDIO_ATTR_TONE_FREQ, (void **)&freq)); 169 eo_do(in, eo_key_data_get(ECORE_AUDIO_ATTR_TONE_FREQ, (void **)&freq));
170 fail_if(freq != 1000); 170 fail_if(freq != 1000);
171 171
172 freq = 2000; 172 freq = 2000;
173 eo_do(in, eo_base_data_set(ECORE_AUDIO_ATTR_TONE_FREQ, &freq, NULL)); 173 eo_do(in, eo_key_data_set(ECORE_AUDIO_ATTR_TONE_FREQ, &freq, NULL));
174 174
175 eo_do(in, eo_base_data_get(ECORE_AUDIO_ATTR_TONE_FREQ, (void **)&freq)); 175 eo_do(in, eo_key_data_get(ECORE_AUDIO_ATTR_TONE_FREQ, (void **)&freq));
176 fail_if(freq != 2000); 176 fail_if(freq != 2000);
177 177
178 eo_do(in, eo_base_data_set("foo", "bar", NULL)); 178 eo_do(in, eo_key_data_set("foo", "bar", NULL));
179 eo_do(in, eo_base_data_get("foo", (void **)&tmp)); 179 eo_do(in, eo_key_data_get("foo", (void **)&tmp));
180 ck_assert_str_eq(tmp, "bar"); 180 ck_assert_str_eq(tmp, "bar");
181 181
182 eo_do(in, ecore_audio_obj_in_seek(5.0, SEEK_SET, &len)); 182 eo_do(in, ecore_audio_obj_in_seek(5.0, SEEK_SET, &len));
diff --git a/src/tests/eo/composite_objects/composite_objects_comp.c b/src/tests/eo/composite_objects/composite_objects_comp.c
index c711ffe28f..8d4756be5b 100644
--- a/src/tests/eo/composite_objects/composite_objects_comp.c
+++ b/src/tests/eo/composite_objects/composite_objects_comp.c
@@ -31,7 +31,7 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED)
31 fail_if(eo_composite_is(obj)); 31 fail_if(eo_composite_is(obj));
32 fail_if(!eo_composite_is(simple)); 32 fail_if(!eo_composite_is(simple));
33 33
34 eo_do(obj, eo_base_data_set("simple-obj", simple, NULL)); 34 eo_do(obj, eo_key_data_set("simple-obj", simple, NULL));
35 35
36 eo_unref(simple); 36 eo_unref(simple);
37} 37}
diff --git a/src/tests/eo/composite_objects/composite_objects_main.c b/src/tests/eo/composite_objects/composite_objects_main.c
index ecf5983cb0..9c3d95c426 100644
--- a/src/tests/eo/composite_objects/composite_objects_main.c
+++ b/src/tests/eo/composite_objects/composite_objects_main.c
@@ -45,7 +45,7 @@ main(int argc, char *argv[])
45 45
46 /* disable the callback forwarder, and fail if it's still called. */ 46 /* disable the callback forwarder, and fail if it's still called. */
47 Eo *simple = NULL; 47 Eo *simple = NULL;
48 eo_do(obj, simple = eo_base_data_get("simple-obj")); 48 eo_do(obj, simple = eo_key_data_get("simple-obj"));
49 eo_ref(simple); 49 eo_ref(simple);
50 eo_do(simple, eo_event_callback_forwarder_del(EV_A_CHANGED, obj)); 50 eo_do(simple, eo_event_callback_forwarder_del(EV_A_CHANGED, obj));
51 51
diff --git a/src/tests/eo/signals/signals_simple.c b/src/tests/eo/signals/signals_simple.c
index 6786aae8fb..f370a2794b 100644
--- a/src/tests/eo/signals/signals_simple.c
+++ b/src/tests/eo/signals/signals_simple.c
@@ -68,7 +68,7 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED)
68 eo_do(obj, eo_event_callback_add(EO_EV_CALLBACK_ADD, _cb_added, NULL)); 68 eo_do(obj, eo_event_callback_add(EO_EV_CALLBACK_ADD, _cb_added, NULL));
69 eo_do(obj, eo_event_callback_add(EO_EV_CALLBACK_DEL, _cb_deled, NULL)); 69 eo_do(obj, eo_event_callback_add(EO_EV_CALLBACK_DEL, _cb_deled, NULL));
70 70
71 eo_do(obj, eo_base_data_set("cb_count", (intptr_t) 0, NULL)); 71 eo_do(obj, eo_key_data_set("cb_count", (intptr_t) 0, NULL));
72} 72}
73 73
74EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a); 74EAPI EO_VOID_FUNC_BODYV(simple_a_set, EO_FUNC_CALL(a), int a);
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index a5e9f3340c..2f6d79e4cc 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -519,56 +519,56 @@ START_TEST(eo_generic_data)
519 Eo *obj = eo_add(SIMPLE_CLASS, NULL); 519 Eo *obj = eo_add(SIMPLE_CLASS, NULL);
520 void *data = NULL; 520 void *data = NULL;
521 521
522 eo_do(obj, eo_base_data_set("test1", (void *) 1, NULL)); 522 eo_do(obj, eo_key_data_set("test1", (void *) 1, NULL));
523 eo_do(obj, data = eo_base_data_get("test1")); 523 eo_do(obj, data = eo_key_data_get("test1"));
524 fail_if(1 != (intptr_t) data); 524 fail_if(1 != (intptr_t) data);
525 eo_do(obj, eo_base_data_del("test1")); 525 eo_do(obj, eo_key_data_del("test1"));
526 eo_do(obj, data = eo_base_data_get("test1")); 526 eo_do(obj, data = eo_key_data_get("test1"));
527 fail_if(data); 527 fail_if(data);
528 528
529 eo_do(obj, eo_base_data_set("test1", (void *) 1, NULL)); 529 eo_do(obj, eo_key_data_set("test1", (void *) 1, NULL));
530 eo_do(obj, eo_base_data_set("test2", (void *) 2, NULL)); 530 eo_do(obj, eo_key_data_set("test2", (void *) 2, NULL));
531 eo_do(obj, data = eo_base_data_get("test1")); 531 eo_do(obj, data = eo_key_data_get("test1"));
532 fail_if(1 != (intptr_t) data); 532 fail_if(1 != (intptr_t) data);
533 eo_do(obj, data = eo_base_data_get("test2")); 533 eo_do(obj, data = eo_key_data_get("test2"));
534 fail_if(2 != (intptr_t) data); 534 fail_if(2 != (intptr_t) data);
535 535
536 eo_do(obj, data = eo_base_data_get("test2")); 536 eo_do(obj, data = eo_key_data_get("test2"));
537 fail_if(2 != (intptr_t) data); 537 fail_if(2 != (intptr_t) data);
538 eo_do(obj, eo_base_data_del("test2")); 538 eo_do(obj, eo_key_data_del("test2"));
539 eo_do(obj, data = eo_base_data_get("test2")); 539 eo_do(obj, data = eo_key_data_get("test2"));
540 fail_if(data); 540 fail_if(data);
541 541
542 eo_do(obj, data = eo_base_data_get("test1")); 542 eo_do(obj, data = eo_key_data_get("test1"));
543 fail_if(1 != (intptr_t) data); 543 fail_if(1 != (intptr_t) data);
544 eo_do(obj, eo_base_data_del("test1")); 544 eo_do(obj, eo_key_data_del("test1"));
545 eo_do(obj, data = eo_base_data_get("test1")); 545 eo_do(obj, data = eo_key_data_get("test1"));
546 fail_if(data); 546 fail_if(data);
547 547
548 int a = 0; 548 int a = 0;
549 eo_do(obj, eo_base_data_set("test3", &a, _fake_free_func)); 549 eo_do(obj, eo_key_data_set("test3", &a, _fake_free_func));
550 eo_do(obj, data = eo_base_data_get("test3")); 550 eo_do(obj, data = eo_key_data_get("test3"));
551 fail_if(&a != data); 551 fail_if(&a != data);
552 eo_do(obj, eo_base_data_get("test3")); 552 eo_do(obj, eo_key_data_get("test3"));
553 eo_do(obj, eo_base_data_del("test3")); 553 eo_do(obj, eo_key_data_del("test3"));
554 fail_if(a != 1); 554 fail_if(a != 1);
555 555
556 a = 0; 556 a = 0;
557 eo_do(obj, eo_base_data_set("test3", &a, _fake_free_func)); 557 eo_do(obj, eo_key_data_set("test3", &a, _fake_free_func));
558 eo_do(obj, eo_base_data_set("test3", NULL, _fake_free_func)); 558 eo_do(obj, eo_key_data_set("test3", NULL, _fake_free_func));
559 fail_if(a != 1); 559 fail_if(a != 1);
560 a = 0; 560 a = 0;
561 data = (void *) 123; 561 data = (void *) 123;
562 eo_do(obj, eo_base_data_set(NULL, &a, _fake_free_func)); 562 eo_do(obj, eo_key_data_set(NULL, &a, _fake_free_func));
563 eo_do(obj, data = eo_base_data_get(NULL)); 563 eo_do(obj, data = eo_key_data_get(NULL));
564 fail_if(data); 564 fail_if(data);
565 eo_do(obj, eo_base_data_del(NULL)); 565 eo_do(obj, eo_key_data_del(NULL));
566 566
567 a = 0; 567 a = 0;
568 eo_do(obj, eo_base_data_set("test3", &a, _fake_free_func)); 568 eo_do(obj, eo_key_data_set("test3", &a, _fake_free_func));
569 eo_do(obj, eo_base_data_set("test3", NULL, NULL)); 569 eo_do(obj, eo_key_data_set("test3", NULL, NULL));
570 fail_if(a != 1); 570 fail_if(a != 1);
571 eo_do(obj, eo_base_data_set("test3", &a, _fake_free_func)); 571 eo_do(obj, eo_key_data_set("test3", &a, _fake_free_func));
572 572
573 eo_unref(obj); 573 eo_unref(obj);
574 fail_if(a != 2); 574 fail_if(a != 2);