summaryrefslogtreecommitdiff
path: root/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eina_cxx/eina_cxx_test_ptrarray.cc')
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_ptrarray.cc54
1 files changed, 30 insertions, 24 deletions
diff --git a/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc b/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc
index 6b2f627..4b7fce3 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);