summaryrefslogtreecommitdiff
path: root/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-11 12:28:51 +0000
committerTom Hacohen <tom@stosb.com>2016-03-11 12:29:03 +0000
commit72c623603830557b9582774e5e9575629036007d (patch)
treed81322293328f9b328fac1908d8eac3c61cecaf0 /src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
parentbe8605dc44de90227c33efd240e1895b1169047b (diff)
Revert "cxx: Migrate C++ binding to the new eo_add syntax"
This reverts commit 48f62ad686d11c97ec62b1ba528262edf39cafbf.
Diffstat (limited to '')
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_ptrlist.cc50
1 files changed, 22 insertions, 28 deletions
diff --git a/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc b/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
index 2c10263424..039ef971bc 100644
--- a/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
@@ -28,10 +28,9 @@ 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 Eo* eoptr = nullptr; 31 wrapper const w1(eo_add(SIMPLE_CLASS, NULL));
32 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 32 wrapper const w2(eo_add(SIMPLE_CLASS, NULL));
33 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 33 wrapper const w3(eo_add(SIMPLE_CLASS, NULL));
34 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
35 34
36 { 35 {
37 efl::eina::ptr_list<int> list; 36 efl::eina::ptr_list<int> list;
@@ -78,10 +77,9 @@ START_TEST(eina_cxx_ptrlist_pop_back)
78 int result[] = {5, 10}; 77 int result[] = {5, 10};
79 int rresult[] = {10, 5}; 78 int rresult[] = {10, 5};
80 79
81 Eo* eoptr = nullptr; 80 wrapper const w1(eo_add(SIMPLE_CLASS, NULL));
82 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 81 wrapper const w2(eo_add(SIMPLE_CLASS, NULL));
83 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 82 wrapper const w3(eo_add(SIMPLE_CLASS, NULL));
84 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
85 83
86 { 84 {
87 efl::eina::ptr_list<int> list; 85 efl::eina::ptr_list<int> list;
@@ -145,10 +143,9 @@ START_TEST(eina_cxx_ptrlist_push_front)
145 ck_assert(std::equal(list.rbegin(), list.rend(), rresult)); 143 ck_assert(std::equal(list.rbegin(), list.rend(), rresult));
146 } 144 }
147 { 145 {
148 Eo* eoptr = nullptr; 146 wrapper const w1(eo_add(SIMPLE_CLASS, NULL));
149 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 147 wrapper const w2(eo_add(SIMPLE_CLASS, NULL));
150 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 148 wrapper const w3(eo_add(SIMPLE_CLASS, NULL));
151 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
152 149
153 efl::eina::list<wrapper> list; 150 efl::eina::list<wrapper> list;
154 151
@@ -174,10 +171,9 @@ START_TEST(eina_cxx_ptrlist_pop_front)
174 int result[] = {10, 5}; 171 int result[] = {10, 5};
175 int rresult[] = {5, 10}; 172 int rresult[] = {5, 10};
176 173
177 Eo* eoptr = nullptr; 174 wrapper const w1(eo_add(SIMPLE_CLASS, NULL));
178 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 175 wrapper const w2(eo_add(SIMPLE_CLASS, NULL));
179 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 176 wrapper const w3(eo_add(SIMPLE_CLASS, NULL));
180 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL));
181 177
182 { 178 {
183 efl::eina::ptr_list<int> list; 179 efl::eina::ptr_list<int> list;
@@ -277,12 +273,11 @@ START_TEST(eina_cxx_ptrlist_insert)
277 ck_assert(std::equal(list.begin(), list.end(), list4.begin())); 273 ck_assert(std::equal(list.begin(), list.end(), list4.begin()));
278 } 274 }
279 { 275 {
280 Eo* eoptr = nullptr; 276 wrapper const w0(eo_add(SIMPLE_CLASS, NULL));
281 wrapper const w0(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 277 wrapper const w1(eo_add(SIMPLE_CLASS, NULL));
282 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 278 wrapper const w2(eo_add(SIMPLE_CLASS, NULL));
283 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 279 wrapper const w3(eo_add(SIMPLE_CLASS, NULL));
284 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 280 wrapper const w4(eo_add(SIMPLE_CLASS, NULL));
285 wrapper const w4(eo_add(&eoptr, SIMPLE_CLASS, NULL));
286 281
287 efl::eina::list<wrapper> list; 282 efl::eina::list<wrapper> list;
288 283
@@ -371,12 +366,11 @@ START_TEST(eina_cxx_ptrlist_constructors)
371 ck_assert(list2 == list4); 366 ck_assert(list2 == list4);
372 } 367 }
373 { 368 {
374 Eo* eoptr = nullptr; 369 wrapper const w0(eo_add(SIMPLE_CLASS, NULL));
375 wrapper const w0(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 370 wrapper const w1(eo_add(SIMPLE_CLASS, NULL));
376 wrapper const w1(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 371 wrapper const w2(eo_add(SIMPLE_CLASS, NULL));
377 wrapper const w2(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 372 wrapper const w3(eo_add(SIMPLE_CLASS, NULL));
378 wrapper const w3(eo_add(&eoptr, SIMPLE_CLASS, NULL)); 373 wrapper const w4(eo_add(SIMPLE_CLASS, NULL));
379 wrapper const w4(eo_add(&eoptr, SIMPLE_CLASS, NULL));
380 374
381 efl::eina::list<wrapper> list1; 375 efl::eina::list<wrapper> list1;
382 ck_assert(list1.empty()); 376 ck_assert(list1.empty());