summaryrefslogtreecommitdiff
path: root/src/tests/eina_cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eina_cxx')
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_accessor.cc18
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_ptrarray.cc54
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_ptrlist.cc50
3 files changed, 68 insertions, 54 deletions
diff --git a/src/tests/eina_cxx/eina_cxx_test_accessor.cc b/src/tests/eina_cxx/eina_cxx_test_accessor.cc
index 9737f0d383..47cb62b7d9 100644
--- a/src/tests/eina_cxx/eina_cxx_test_accessor.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_accessor.cc
@@ -43,10 +43,11 @@ START_TEST(eina_cxx_eo_accessor_indexing)
43 43
44 efl::eina::list<wrapper> list; 44 efl::eina::list<wrapper> list;
45 45
46 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 46 Eo* eoptr = nullptr;
47 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 47 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
48 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 48 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
49 wrapper const w4(eo_add(SIMPLE_CLASS, NULL)); 49 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
50 wrapper const w4(eo_add(&eoptr, SIMPLE_CLASS, NULL));
50 51
51 list.push_back(w1); 52 list.push_back(w1);
52 list.push_back(w2); 53 list.push_back(w2);
@@ -97,10 +98,11 @@ START_TEST(eina_cxx_eo_accessor_iterator)
97 98
98 efl::eina::list<wrapper> list; 99 efl::eina::list<wrapper> list;
99 100
100 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 101 Eo* eoptr = nullptr;
101 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 102 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
102 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 103 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
103 wrapper const w4(eo_add(SIMPLE_CLASS, NULL)); 104 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
105 wrapper const w4(eo_add(&eoptr, SIMPLE_CLASS, NULL));
104 106
105 list.push_back(w1); 107 list.push_back(w1);
106 list.push_back(w2); 108 list.push_back(w2);
diff --git a/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc b/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc
index 6b2f6271d8..4b7fce3572 100644
--- a/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc
@@ -26,9 +26,10 @@ START_TEST(eina_cxx_ptrarray_push_back)
26 int result[] = {5, 10, 15}; 26 int result[] = {5, 10, 15};
27 int rresult[] = {15, 10, 5}; 27 int rresult[] = {15, 10, 5};
28 28
29 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 29 Eo* eoptr = nullptr;
30 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 30 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
31 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 31 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
32 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
32 33
33 { 34 {
34 efl::eina::ptr_array<int> array; 35 efl::eina::ptr_array<int> array;
@@ -102,9 +103,10 @@ START_TEST(eina_cxx_ptrarray_pop_back)
102 ck_assert(std::equal(array.rbegin(), array.rend(), rresult)); 103 ck_assert(std::equal(array.rbegin(), array.rend(), rresult));
103 } 104 }
104 { 105 {
105 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 106 Eo* eoptr = nullptr;
106 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 107 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
107 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 108 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
109 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
108 110
109 efl::eina::array<wrapper> array; 111 efl::eina::array<wrapper> array;
110 112
@@ -197,11 +199,12 @@ START_TEST(eina_cxx_ptrarray_insert)
197 ck_assert(std::equal(array.begin(), array.end(), array4.begin())); 199 ck_assert(std::equal(array.begin(), array.end(), array4.begin()));
198 } 200 }
199 { 201 {
200 wrapper const w0(eo_add(SIMPLE_CLASS, NULL)); 202 Eo* eoptr = nullptr;
201 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 203 wrapper const w0(eo_add(&eoptr, SIMPLE_CLASS, NULL));
202 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 204 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
203 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 205 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
204 wrapper const w4(eo_add(SIMPLE_CLASS, NULL)); 206 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
207 wrapper const w4(eo_add(&eoptr, SIMPLE_CLASS, NULL));
205 208
206 efl::eina::array<wrapper> array; 209 efl::eina::array<wrapper> array;
207 ck_assert(std::distance(array.begin(), array.end()) == 0u); 210 ck_assert(std::distance(array.begin(), array.end()) == 0u);
@@ -277,7 +280,8 @@ START_TEST(eina_cxx_ptrarray_constructors)
277 efl::eina::eina_init eina_init; 280 efl::eina::eina_init eina_init;
278 efl::eo::eo_init eo_init; 281 efl::eo::eo_init eo_init;
279 282
280 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 283 Eo* eoptr = nullptr;
284 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
281 285
282 { 286 {
283 efl::eina::ptr_array<int> array1; 287 efl::eina::ptr_array<int> array1;
@@ -356,12 +360,13 @@ START_TEST(eina_cxx_ptrarray_erase)
356 ck_assert(array1.back() == 25); 360 ck_assert(array1.back() == 25);
357 } 361 }
358 { 362 {
359 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 363 Eo* eoptr = nullptr;
360 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 364 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
361 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 365 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
362 wrapper const w4(eo_add(SIMPLE_CLASS, NULL)); 366 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
363 wrapper const w5(eo_add(SIMPLE_CLASS, NULL)); 367 wrapper const w4(eo_add(&eoptr, SIMPLE_CLASS, NULL));
364 wrapper const w6(eo_add(SIMPLE_CLASS, NULL)); 368 wrapper const w5(eo_add(&eoptr, SIMPLE_CLASS, NULL));
369 wrapper const w6(eo_add(&eoptr, SIMPLE_CLASS, NULL));
365 370
366 efl::eina::array<wrapper> array1; 371 efl::eina::array<wrapper> array1;
367 372
@@ -437,12 +442,13 @@ START_TEST(eina_cxx_ptrarray_range)
437 } 442 }
438 443
439 { 444 {
440 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 445 Eo* eoptr = nullptr;
441 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 446 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
442 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 447 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
443 wrapper const w4(eo_add(SIMPLE_CLASS, NULL)); 448 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
444 wrapper const w5(eo_add(SIMPLE_CLASS, NULL)); 449 wrapper const w4(eo_add(&eoptr, SIMPLE_CLASS, NULL));
445 wrapper const w6(eo_add(SIMPLE_CLASS, NULL)); 450 wrapper const w5(eo_add(&eoptr, SIMPLE_CLASS, NULL));
451 wrapper const w6(eo_add(&eoptr, SIMPLE_CLASS, NULL));
446 452
447 efl::eina::array<wrapper> array; 453 efl::eina::array<wrapper> array;
448 array.push_back(w1); 454 array.push_back(w1);
diff --git a/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc b/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
index 039ef971bc..2c10263424 100644
--- a/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
@@ -28,9 +28,10 @@ START_TEST(eina_cxx_ptrlist_push_back)
28 int result[] = {5, 10, 15}; 28 int result[] = {5, 10, 15};
29 int rresult[] = {15, 10, 5}; 29 int rresult[] = {15, 10, 5};
30 30
31 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 31 Eo* eoptr = nullptr;
32 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 32 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
33 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 33 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
34 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
34 35
35 { 36 {
36 efl::eina::ptr_list<int> list; 37 efl::eina::ptr_list<int> list;
@@ -77,9 +78,10 @@ START_TEST(eina_cxx_ptrlist_pop_back)
77 int result[] = {5, 10}; 78 int result[] = {5, 10};
78 int rresult[] = {10, 5}; 79 int rresult[] = {10, 5};
79 80
80 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 81 Eo* eoptr = nullptr;
81 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 82 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
82 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 83 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
84 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
83 85
84 { 86 {
85 efl::eina::ptr_list<int> list; 87 efl::eina::ptr_list<int> list;
@@ -143,9 +145,10 @@ START_TEST(eina_cxx_ptrlist_push_front)
143 ck_assert(std::equal(list.rbegin(), list.rend(), rresult)); 145 ck_assert(std::equal(list.rbegin(), list.rend(), rresult));
144 } 146 }
145 { 147 {
146 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 148 Eo* eoptr = nullptr;
147 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 149 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
148 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 150 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
151 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
149 152
150 efl::eina::list<wrapper> list; 153 efl::eina::list<wrapper> list;
151 154
@@ -171,9 +174,10 @@ START_TEST(eina_cxx_ptrlist_pop_front)
171 int result[] = {10, 5}; 174 int result[] = {10, 5};
172 int rresult[] = {5, 10}; 175 int rresult[] = {5, 10};
173 176
174 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 177 Eo* eoptr = nullptr;
175 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 178 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
176 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 179 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
180 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
177 181
178 { 182 {
179 efl::eina::ptr_list<int> list; 183 efl::eina::ptr_list<int> list;
@@ -273,11 +277,12 @@ START_TEST(eina_cxx_ptrlist_insert)
273 ck_assert(std::equal(list.begin(), list.end(), list4.begin())); 277 ck_assert(std::equal(list.begin(), list.end(), list4.begin()));
274 } 278 }
275 { 279 {
276 wrapper const w0(eo_add(SIMPLE_CLASS, NULL)); 280 Eo* eoptr = nullptr;
277 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 281 wrapper const w0(eo_add(&eoptr, SIMPLE_CLASS, NULL));
278 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 282 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
279 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 283 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
280 wrapper const w4(eo_add(SIMPLE_CLASS, NULL)); 284 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
285 wrapper const w4(eo_add(&eoptr, SIMPLE_CLASS, NULL));
281 286
282 efl::eina::list<wrapper> list; 287 efl::eina::list<wrapper> list;
283 288
@@ -366,11 +371,12 @@ START_TEST(eina_cxx_ptrlist_constructors)
366 ck_assert(list2 == list4); 371 ck_assert(list2 == list4);
367 } 372 }
368 { 373 {
369 wrapper const w0(eo_add(SIMPLE_CLASS, NULL)); 374 Eo* eoptr = nullptr;
370 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 375 wrapper const w0(eo_add(&eoptr, SIMPLE_CLASS, NULL));
371 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 376 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL));
372 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 377 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL));
373 wrapper const w4(eo_add(SIMPLE_CLASS, NULL)); 378 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
379 wrapper const w4(eo_add(&eoptr, SIMPLE_CLASS, NULL));
374 380
375 efl::eina::list<wrapper> list1; 381 efl::eina::list<wrapper> list1;
376 ck_assert(list1.empty()); 382 ck_assert(list1.empty());