summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent dot torri at gmail dot com>2016-02-04 14:49:18 +0100
committerTom Hacohen <tom@stosb.com>2016-02-16 12:41:06 +0000
commitdce4a966ad862f19ff59d2f0ebeeadc739b016d6 (patch)
tree458588c6cd008e014c2581316c3b519e571da7d0
parent1b143f233ea44edc83059e4b9423e4b0905d230a (diff)
Test rework #11: Eina_Cxx
-rw-r--r--src/Makefile_Eina_Cxx.am3
-rw-r--r--src/tests/eina_cxx/eina_cxx_suite.cc115
-rw-r--r--src/tests/eina_cxx/eina_cxx_suite.h22
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_accessor.cc9
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_error.cc11
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_inarray.cc19
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_inlist.cc14
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_iterator.cc9
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_log.cc7
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_optional.cc9
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_ptrarray.cc27
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_ptrlist.cc21
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_stringshare.cc7
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_thread.cc7
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_value.cc5
15 files changed, 92 insertions, 193 deletions
diff --git a/src/Makefile_Eina_Cxx.am b/src/Makefile_Eina_Cxx.am
index 6f1d0ab..ea5f937 100644
--- a/src/Makefile_Eina_Cxx.am
+++ b/src/Makefile_Eina_Cxx.am
@@ -60,7 +60,8 @@ tests/eina_cxx/eina_cxx_test_accessor.cc \
60tests/eina_cxx/eina_cxx_test_thread.cc \ 60tests/eina_cxx/eina_cxx_test_thread.cc \
61tests/eina_cxx/eina_cxx_test_optional.cc \ 61tests/eina_cxx/eina_cxx_test_optional.cc \
62tests/eina_cxx/eina_cxx_test_value.cc \ 62tests/eina_cxx/eina_cxx_test_value.cc \
63tests/eina_cxx/simple.c 63tests/eina_cxx/simple.c \
64tests/eina_cxx/eina_cxx_suite.h
64 65
65tests/eina_cxx/tests_eina_cxx_eina_cxx_suite-eina_cxx_test_accessor.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h 66tests/eina_cxx/tests_eina_cxx_eina_cxx_suite-eina_cxx_test_accessor.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
66tests/eina_cxx/tests_eina_cxx_eina_cxx_suite-eina_cxx_test_ptrarray.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h 67tests/eina_cxx/tests_eina_cxx_eina_cxx_suite-eina_cxx_test_ptrarray.$(OBJEXT): tests/eina_cxx/simple.eo.hh tests/eina_cxx/simple.eo.h
diff --git a/src/tests/eina_cxx/eina_cxx_suite.cc b/src/tests/eina_cxx/eina_cxx_suite.cc
index 3bb028d..6a03f22 100644
--- a/src/tests/eina_cxx/eina_cxx_suite.cc
+++ b/src/tests/eina_cxx/eina_cxx_suite.cc
@@ -1,36 +1,11 @@
1
2#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
3# include <config.h> 2# include <config.h>
4#endif 3#endif
5 4
6#include "Eina.hh" 5#include "eina_cxx_suite.h"
7 6#include "../efl_check.h"
8#include <cassert>
9#include <algorithm>
10
11#include <check.h>
12
13void eina_test_inlist(TCase* tc);
14void eina_test_inarray(TCase* tc);
15void eina_test_ptrlist(TCase* tc);
16void eina_test_ptrarray(TCase* tc);
17void eina_test_iterator(TCase* tc);
18void eina_test_stringshare(TCase* tc);
19void eina_test_error(TCase* tc);
20void eina_test_accessor(TCase* tc);
21void eina_test_thread(TCase* tc);
22void eina_test_optional(TCase* tc);
23void eina_test_value(TCase* tc);
24void eina_test_log(TCase* tc);
25
26typedef struct _Eina_Test_Case Eina_Test_Case;
27struct _Eina_Test_Case
28{
29 const char *test_case;
30 void (*build)(TCase *tc);
31};
32 7
33static const Eina_Test_Case etc[] = { 8static const Efl_Test_Case etc[] = {
34 { "Ptr_List", eina_test_ptrlist }, 9 { "Ptr_List", eina_test_ptrlist },
35 { "Ptr_Array", eina_test_ptrarray }, 10 { "Ptr_Array", eina_test_ptrarray },
36 { "Inlist", eina_test_inlist }, 11 { "Inlist", eina_test_inlist },
@@ -46,88 +21,18 @@ static const Eina_Test_Case etc[] = {
46 { NULL, NULL } 21 { NULL, NULL }
47}; 22};
48 23
49static void 24int
50_list_tests(void) 25main(int argc, char* argv[])
51{ 26{
52 const Eina_Test_Case *itr = etc; 27 int failed_count;
53 fputs("Available Test Cases:\n", stderr);
54 for (; itr->test_case; itr++)
55 fprintf(stderr, "\t%s\n", itr->test_case);
56}
57
58static Eina_Bool
59_use_test(int argc, const char **argv, const char *test_case)
60{
61 if (argc < 1)
62 return 1;
63
64 for (; argc > 0; argc--, argv++)
65 if (strcmp(test_case, *argv) == 0)
66 return 1;
67 28
68 return 0; 29 if (!_efl_test_option_disp(argc, argv, etc))
69} 30 return 0;
70
71Suite *
72eina_build_suite(int argc, const char **argv)
73{
74 TCase *tc;
75 Suite *s;
76 int i;
77
78 s = suite_create("Eina C++");
79
80 for (i = 0; etc[i].test_case; ++i)
81 {
82 if (!_use_test(argc, argv, etc[i].test_case))
83 continue;
84
85 tc = tcase_create(etc[i].test_case);
86#ifndef _WIN32
87 tcase_set_timeout(tc, 0);
88#endif
89
90 etc[i].build(tc);
91 suite_add_tcase(s, tc);
92 }
93
94 return s;
95}
96
97int main(int argc, char* argv[])
98{
99 Suite *s;
100 SRunner *sr;
101 int i, failed_count;
102
103 for (i = 1; i < argc; i++)
104 if ((strcmp(argv[i], "-h") == 0) ||
105 (strcmp(argv[i], "--help") == 0))
106 {
107 fprintf(stderr, "Usage:\n\t%s [test_case1 .. [test_caseN]]\n",
108 argv[0]);
109 _list_tests();
110 return 0;
111 }
112 else if ((strcmp(argv[i], "-l") == 0) ||
113 (strcmp(argv[i], "--list") == 0))
114 {
115 _list_tests();
116 return 0;
117 }
118 31
119 putenv(const_cast<char*>("EFL_RUN_IN_TREE=1")); 32 putenv(const_cast<char*>("EFL_RUN_IN_TREE=1"));
120 33
121 s = eina_build_suite(argc - 1, (const char **)argv + 1); 34 failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
122 sr = srunner_create(s); 35 "Eina C++", etc);
123
124 srunner_set_xml(sr, TESTS_BUILD_DIR "/check-results.xml");
125
126 srunner_run_all(sr, CK_ENV);
127 failed_count = srunner_ntests_failed(sr);
128 srunner_free(sr);
129
130 eina_shutdown();
131 36
132 return (failed_count == 0) ? 0 : 255; 37 return (failed_count == 0) ? 0 : 255;
133} 38}
diff --git a/src/tests/eina_cxx/eina_cxx_suite.h b/src/tests/eina_cxx/eina_cxx_suite.h
new file mode 100644
index 0000000..41e9af7
--- /dev/null
+++ b/src/tests/eina_cxx/eina_cxx_suite.h
@@ -0,0 +1,22 @@
1#ifndef _EINA_CXX_SUITE_H
2#define _EINA_CXX_SUITE_H
3
4#include <cassert>
5#include <algorithm>
6
7#include <check.h>
8
9void eina_test_inlist(TCase* tc);
10void eina_test_inarray(TCase* tc);
11void eina_test_ptrlist(TCase* tc);
12void eina_test_ptrarray(TCase* tc);
13void eina_test_iterator(TCase* tc);
14void eina_test_stringshare(TCase* tc);
15void eina_test_error(TCase* tc);
16void eina_test_accessor(TCase* tc);
17void eina_test_thread(TCase* tc);
18void eina_test_optional(TCase* tc);
19void eina_test_value(TCase* tc);
20void eina_test_log(TCase* tc);
21
22#endif /* _EINA_CXX_SUITE_H */
diff --git a/src/tests/eina_cxx/eina_cxx_test_accessor.cc b/src/tests/eina_cxx/eina_cxx_test_accessor.cc
index af49fb9..9737f0d 100644
--- a/src/tests/eina_cxx/eina_cxx_test_accessor.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_accessor.cc
@@ -1,14 +1,11 @@
1
2#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
3# include <config.h> 2# include <config.h>
4#endif 3#endif
5 4
6#include "Eina.hh" 5#include <Eina.hh>
7#include "Eo.hh" 6#include <Eo.hh>
8
9#include <algorithm>
10 7
11#include <check.h> 8#include "eina_cxx_suite.h"
12 9
13extern "C" { 10extern "C" {
14#include "simple.eo.h" 11#include "simple.eo.h"
diff --git a/src/tests/eina_cxx/eina_cxx_test_error.cc b/src/tests/eina_cxx/eina_cxx_test_error.cc
index 8cea5b5..28c5b4b 100644
--- a/src/tests/eina_cxx/eina_cxx_test_error.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_error.cc
@@ -1,11 +1,10 @@
1
2#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
3# include <config.h> 2# include <config.h>
4#endif 3#endif
5 4
6#include "Eina.hh" 5#include <Eina.hh>
7 6
8#include <check.h> 7#include "eina_cxx_suite.h"
9 8
10Eina_Error my_error, my_error_2; 9Eina_Error my_error, my_error_2;
11 10
@@ -16,7 +15,7 @@ START_TEST(eina_cxx_get_error)
16 my_error = ::eina_error_msg_static_register("Message 1"); 15 my_error = ::eina_error_msg_static_register("Message 1");
17 16
18 ::eina_error_set(0); 17 ::eina_error_set(0);
19 18
20 efl::eina::error_code ec1 = efl::eina::get_error_code(); 19 efl::eina::error_code ec1 = efl::eina::get_error_code();
21 ck_assert(!ec1); 20 ck_assert(!ec1);
22 21
@@ -24,14 +23,14 @@ START_TEST(eina_cxx_get_error)
24 23
25 efl::eina::error_code ec2 = efl::eina::get_error_code(); 24 efl::eina::error_code ec2 = efl::eina::get_error_code();
26 ck_assert(!!ec2); 25 ck_assert(!!ec2);
27 26
28 ck_assert(ec2.message() == "Message 1"); 27 ck_assert(ec2.message() == "Message 1");
29 28
30 ::eina_error_set(EINA_ERROR_OUT_OF_MEMORY); 29 ::eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
31 30
32 efl::eina::error_code ec3 = efl::eina::get_error_code(); 31 efl::eina::error_code ec3 = efl::eina::get_error_code();
33 ck_assert(!!ec3); 32 ck_assert(!!ec3);
34 33
35 ck_assert(ec3.message() == "Out of memory"); 34 ck_assert(ec3.message() == "Out of memory");
36} 35}
37END_TEST 36END_TEST
diff --git a/src/tests/eina_cxx/eina_cxx_test_inarray.cc b/src/tests/eina_cxx/eina_cxx_test_inarray.cc
index 995ae9b..2792c19 100644
--- a/src/tests/eina_cxx/eina_cxx_test_inarray.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_inarray.cc
@@ -1,16 +1,13 @@
1
2#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
3# include <config.h> 2# include <config.h>
4#endif 3#endif
5 4
6#include "Eina.hh"
7
8#include <algorithm>
9#include <functional> 5#include <functional>
10
11#include <iostream> 6#include <iostream>
12 7
13#include <check.h> 8#include <Eina.hh>
9
10#include "eina_cxx_suite.h"
14 11
15START_TEST(eina_cxx_inarray_pod_push_back) 12START_TEST(eina_cxx_inarray_pod_push_back)
16{ 13{
@@ -139,7 +136,7 @@ START_TEST(eina_cxx_inarray_pod_erase)
139 array1.push_back(20); 136 array1.push_back(20);
140 array1.push_back(25); 137 array1.push_back(25);
141 array1.push_back(30); 138 array1.push_back(30);
142 139
143 efl::eina::inarray<int>::iterator it = array1.begin(), it2; 140 efl::eina::inarray<int>::iterator it = array1.begin(), it2;
144 141
145 it = array1.erase(it); 142 it = array1.erase(it);
@@ -152,7 +149,7 @@ START_TEST(eina_cxx_inarray_pod_erase)
152 it = array1.erase(it); 149 it = array1.erase(it);
153 ck_assert(*it == 20); 150 ck_assert(*it == 20);
154 ck_assert(array1.size() == 4); 151 ck_assert(array1.size() == 4);
155 152
156 it = array1.end() - 1; 153 it = array1.end() - 1;
157 it = array1.erase(it); 154 it = array1.erase(it);
158 ck_assert(it == array1.end()); 155 ck_assert(it == array1.end());
@@ -354,7 +351,7 @@ START_TEST(eina_cxx_inarray_nonpod_erase)
354 array1.push_back(20); 351 array1.push_back(20);
355 array1.push_back(25); 352 array1.push_back(25);
356 array1.push_back(30); 353 array1.push_back(30);
357 354
358 efl::eina::inarray<non_pod>::iterator it = array1.begin(), it2; 355 efl::eina::inarray<non_pod>::iterator it = array1.begin(), it2;
359 356
360 it = array1.erase(it); 357 it = array1.erase(it);
@@ -367,13 +364,13 @@ START_TEST(eina_cxx_inarray_nonpod_erase)
367 it = array1.erase(it); 364 it = array1.erase(it);
368 ck_assert(*it == 20); 365 ck_assert(*it == 20);
369 ck_assert(array1.size() == 4); 366 ck_assert(array1.size() == 4);
370 367
371 it = array1.end() - 1; 368 it = array1.end() - 1;
372 it = array1.erase(it); 369 it = array1.erase(it);
373 ck_assert(it == array1.end()); 370 ck_assert(it == array1.end());
374 ck_assert(array1.size() == 3); 371 ck_assert(array1.size() == 3);
375 ck_assert(array1.back() == 25); 372 ck_assert(array1.back() == 25);
376 373
377 it = array1.begin() + 1; 374 it = array1.begin() + 1;
378 it2 = array1.end() - 1; 375 it2 = array1.end() - 1;
379 it = array1.erase(it, it2); 376 it = array1.erase(it, it2);
diff --git a/src/tests/eina_cxx/eina_cxx_test_inlist.cc b/src/tests/eina_cxx/eina_cxx_test_inlist.cc
index 144dfe4..717eb0c 100644
--- a/src/tests/eina_cxx/eina_cxx_test_inlist.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_inlist.cc
@@ -1,14 +1,12 @@
1
2#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
3# include <config.h> 2# include <config.h>
4#endif 3#endif
5 4
6#include "Eina.hh"
7
8#include <algorithm>
9#include <functional> 5#include <functional>
10 6
11#include <check.h> 7#include <Eina.hh>
8
9#include "eina_cxx_suite.h"
12 10
13struct Eina_Test_Inlist 11struct Eina_Test_Inlist
14{ 12{
@@ -180,7 +178,7 @@ START_TEST(eina_cxx_inlist_erase)
180 list1.push_back(20); 178 list1.push_back(20);
181 list1.push_back(25); 179 list1.push_back(25);
182 list1.push_back(30); 180 list1.push_back(30);
183 181
184 efl::eina::inlist<int>::iterator it = list1.begin(), it2; 182 efl::eina::inlist<int>::iterator it = list1.begin(), it2;
185 183
186 it = list1.erase(it); 184 it = list1.erase(it);
@@ -197,7 +195,7 @@ START_TEST(eina_cxx_inlist_erase)
197 ck_assert(it == it2); 195 ck_assert(it == it2);
198 ck_assert(list1.size() == 4); 196 ck_assert(list1.size() == 4);
199 ck_assert(*it2 == 20); 197 ck_assert(*it2 == 20);
200 198
201 it = list1.end(); 199 it = list1.end();
202 --it; 200 --it;
203 it = list1.erase(it); 201 it = list1.erase(it);
@@ -232,7 +230,7 @@ START_TEST(eina_cxx_inlist_range)
232 list.push_back(30); 230 list.push_back(30);
233 231
234 efl::eina::range_inlist<int> range_list(list); 232 efl::eina::range_inlist<int> range_list(list);
235 233
236 ck_assert(range_list.size() == 6u); 234 ck_assert(range_list.size() == 6u);
237 235
238 int result[] = {5, 10, 15, 20, 25, 30}; 236 int result[] = {5, 10, 15, 20, 25, 30};
diff --git a/src/tests/eina_cxx/eina_cxx_test_iterator.cc b/src/tests/eina_cxx/eina_cxx_test_iterator.cc
index 5a0a393..8f7136a 100644
--- a/src/tests/eina_cxx/eina_cxx_test_iterator.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_iterator.cc
@@ -1,13 +1,10 @@
1
2#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
3# include <config.h> 2# include <config.h>
4#endif 3#endif
5 4
6#include "Eina.hh" 5#include <Eina.hh>
7
8#include <algorithm>
9 6
10#include <check.h> 7#include "eina_cxx_suite.h"
11 8
12START_TEST(eina_cxx_iterator_equal) 9START_TEST(eina_cxx_iterator_equal)
13{ 10{
@@ -21,7 +18,7 @@ START_TEST(eina_cxx_iterator_equal)
21 list.push_back(new int(10)); 18 list.push_back(new int(10));
22 list.push_back(new int(15)); 19 list.push_back(new int(15));
23 list.push_back(new int(20)); 20 list.push_back(new int(20));
24 21
25 efl::eina::iterator<int> iterator = list.ibegin() 22 efl::eina::iterator<int> iterator = list.ibegin()
26 , last_iterator = list.iend(); 23 , last_iterator = list.iend();
27 24
diff --git a/src/tests/eina_cxx/eina_cxx_test_log.cc b/src/tests/eina_cxx/eina_cxx_test_log.cc
index e20ebdf..6e51780 100644
--- a/src/tests/eina_cxx/eina_cxx_test_log.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_log.cc
@@ -1,13 +1,10 @@
1
2#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
3# include <config.h> 2# include <config.h>
4#endif 3#endif
5 4
6#include "Eina.hh" 5#include <Eina.hh>
7
8#include <algorithm>
9 6
10#include <check.h> 7#include "eina_cxx_suite.h"
11 8
12bool expensive_called = false; 9bool expensive_called = false;
13 10
diff --git a/src/tests/eina_cxx/eina_cxx_test_optional.cc b/src/tests/eina_cxx/eina_cxx_test_optional.cc
index 4043cb0..31e9ffe 100644
--- a/src/tests/eina_cxx/eina_cxx_test_optional.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_optional.cc
@@ -1,15 +1,12 @@
1
2#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
3# include <config.h> 2# include <config.h>
4#endif 3#endif
5 4
6#include "Eina.hh" 5#include <iostream>
7
8#include <algorithm>
9 6
10#include <check.h> 7#include <Eina.hh>
11 8
12#include <iostream> 9#include "eina_cxx_suite.h"
13 10
14std::size_t nonpod_constructed = 0u 11std::size_t nonpod_constructed = 0u
15 , nonpod_destructed = 0u; 12 , nonpod_destructed = 0u;
diff --git a/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc b/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc
index 2bf8bb5..6b2f627 100644
--- a/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc
@@ -1,16 +1,13 @@
1
2#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
3# include <config.h> 2# include <config.h>
4#endif 3#endif
5 4
6#include "Eina.hh" 5#include <Eina.hh>
7#include "Eo.hh"
8
9#include <eina_array.hh> 6#include <eina_array.hh>
7#include <Eo.hh>
10 8
11#include <algorithm> 9#include "eina_cxx_suite.h"
12 10
13#include <check.h>
14extern "C" { 11extern "C" {
15#include "simple.eo.h" 12#include "simple.eo.h"
16} 13}
@@ -32,7 +29,7 @@ START_TEST(eina_cxx_ptrarray_push_back)
32 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 29 wrapper const w1(eo_add(SIMPLE_CLASS, NULL));
33 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 30 wrapper const w2(eo_add(SIMPLE_CLASS, NULL));
34 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 31 wrapper const w3(eo_add(SIMPLE_CLASS, NULL));
35 32
36 { 33 {
37 efl::eina::ptr_array<int> array; 34 efl::eina::ptr_array<int> array;
38 35
@@ -335,7 +332,7 @@ START_TEST(eina_cxx_ptrarray_erase)
335 int rresult[] = {30, 25, 20, 15, 10, 5}; 332 int rresult[] = {30, 25, 20, 15, 10, 5};
336 ck_assert(std::equal(array1.begin(), array1.end(), result)); 333 ck_assert(std::equal(array1.begin(), array1.end(), result));
337 ck_assert(std::equal(array1.rbegin(), array1.rend(), rresult)); 334 ck_assert(std::equal(array1.rbegin(), array1.rend(), rresult));
338 335
339 efl::eina::ptr_array<int>::iterator it = array1.erase(array1.begin()); 336 efl::eina::ptr_array<int>::iterator it = array1.erase(array1.begin());
340 ck_assert(it == array1.begin()); 337 ck_assert(it == array1.begin());
341 ck_assert(array1.size() == 5); 338 ck_assert(array1.size() == 5);
@@ -346,7 +343,7 @@ START_TEST(eina_cxx_ptrarray_erase)
346 it = array1.erase(array1.begin() + 1); 343 it = array1.erase(array1.begin() + 1);
347 ck_assert(*it == 20); 344 ck_assert(*it == 20);
348 ck_assert(array1.size() == 4); 345 ck_assert(array1.size() == 4);
349 346
350 it = array1.erase(array1.end() - 1); 347 it = array1.erase(array1.end() - 1);
351 ck_assert(it == array1.end()); 348 ck_assert(it == array1.end());
352 ck_assert(array1.size() == 3); 349 ck_assert(array1.size() == 3);
@@ -365,9 +362,9 @@ START_TEST(eina_cxx_ptrarray_erase)
365 wrapper const w4(eo_add(SIMPLE_CLASS, NULL)); 362 wrapper const w4(eo_add(SIMPLE_CLASS, NULL));
366 wrapper const w5(eo_add(SIMPLE_CLASS, NULL)); 363 wrapper const w5(eo_add(SIMPLE_CLASS, NULL));
367 wrapper const w6(eo_add(SIMPLE_CLASS, NULL)); 364 wrapper const w6(eo_add(SIMPLE_CLASS, NULL));
368 365
369 efl::eina::array<wrapper> array1; 366 efl::eina::array<wrapper> array1;
370 367
371 array1.push_back(w1); 368 array1.push_back(w1);
372 array1.push_back(w2); 369 array1.push_back(w2);
373 array1.push_back(w3); 370 array1.push_back(w3);
@@ -379,7 +376,7 @@ START_TEST(eina_cxx_ptrarray_erase)
379 wrapper rresult[] = {w6, w5, w4, w3, w2, w1}; 376 wrapper rresult[] = {w6, w5, w4, w3, w2, w1};
380 ck_assert(std::equal(array1.begin(), array1.end(), result_)); 377 ck_assert(std::equal(array1.begin(), array1.end(), result_));
381 ck_assert(std::equal(array1.rbegin(), array1.rend(), rresult)); 378 ck_assert(std::equal(array1.rbegin(), array1.rend(), rresult));
382 379
383 efl::eina::array<wrapper>::iterator it = array1.erase(array1.begin()); 380 efl::eina::array<wrapper>::iterator it = array1.erase(array1.begin());
384 ck_assert(it == array1.begin()); 381 ck_assert(it == array1.begin());
385 ck_assert(array1.size() == 5); 382 ck_assert(array1.size() == 5);
@@ -390,7 +387,7 @@ START_TEST(eina_cxx_ptrarray_erase)
390 it = array1.erase(array1.begin() + 1); 387 it = array1.erase(array1.begin() + 1);
391 ck_assert(*it == w4); 388 ck_assert(*it == w4);
392 ck_assert(array1.size() == 4); 389 ck_assert(array1.size() == 4);
393 390
394 it = array1.erase(array1.end() - 1); 391 it = array1.erase(array1.end() - 1);
395 ck_assert(it == array1.end()); 392 ck_assert(it == array1.end());
396 ck_assert(array1.size() == 3); 393 ck_assert(array1.size() == 3);
@@ -420,7 +417,7 @@ START_TEST(eina_cxx_ptrarray_range)
420 array.push_back(new int(30)); 417 array.push_back(new int(30));
421 418
422 efl::eina::range_ptr_array<int> range_array(array); 419 efl::eina::range_ptr_array<int> range_array(array);
423 420
424 ck_assert(range_array.size() == 6u); 421 ck_assert(range_array.size() == 6u);
425 422
426 int result[] = {5, 10, 15, 20, 25, 30}; 423 int result[] = {5, 10, 15, 20, 25, 30};
@@ -456,7 +453,7 @@ START_TEST(eina_cxx_ptrarray_range)
456 array.push_back(w6); 453 array.push_back(w6);
457 454
458 // efl::eina::range_array<wrapper> range_array(array); 455 // efl::eina::range_array<wrapper> range_array(array);
459 456
460 // ck_assert(range_array.size() == 6u); 457 // ck_assert(range_array.size() == 6u);
461 458
462 // wrapper result[] = {5, 10, 15, 20, 25, 30}; 459 // wrapper result[] = {5, 10, 15, 20, 25, 30};
diff --git a/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc b/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
index 281740d..039ef97 100644
--- a/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
@@ -1,17 +1,14 @@
1
2#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
3# include <config.h> 2# include <config.h>
4#endif 3#endif
5 4
6#include "Eina.hh" 5#include <iostream>
7#include "Eo.hh"
8 6
7#include <Eina.hh>
9#include <eina_list.hh> 8#include <eina_list.hh>
9#include <Eo.hh>
10 10
11#include <algorithm> 11#include "eina_cxx_suite.h"
12#include <iostream>
13
14#include <check.h>
15 12
16extern "C" { 13extern "C" {
17#include "simple.eo.h" 14#include "simple.eo.h"
@@ -34,7 +31,7 @@ START_TEST(eina_cxx_ptrlist_push_back)
34 wrapper const w1(eo_add(SIMPLE_CLASS, NULL)); 31 wrapper const w1(eo_add(SIMPLE_CLASS, NULL));
35 wrapper const w2(eo_add(SIMPLE_CLASS, NULL)); 32 wrapper const w2(eo_add(SIMPLE_CLASS, NULL));
36 wrapper const w3(eo_add(SIMPLE_CLASS, NULL)); 33 wrapper const w3(eo_add(SIMPLE_CLASS, NULL));
37 34
38 { 35 {
39 efl::eina::ptr_list<int> list; 36 efl::eina::ptr_list<int> list;
40 37
@@ -162,7 +159,7 @@ START_TEST(eina_cxx_ptrlist_push_front)
162 ck_assert(list.size() == 3); 159 ck_assert(list.size() == 3);
163 ck_assert(std::equal(list.begin(), list.end(), result)); 160 ck_assert(std::equal(list.begin(), list.end(), result));
164 ck_assert(std::equal(list.rbegin(), list.rend(), rresult)); 161 ck_assert(std::equal(list.rbegin(), list.rend(), rresult));
165 } 162 }
166} 163}
167END_TEST 164END_TEST
168 165
@@ -408,7 +405,7 @@ START_TEST(eina_cxx_ptrlist_erase)
408 list1.push_back(new int(20)); 405 list1.push_back(new int(20));
409 list1.push_back(new int(25)); 406 list1.push_back(new int(25));
410 list1.push_back(new int(30)); 407 list1.push_back(new int(30));
411 408
412 efl::eina::ptr_list<int>::iterator it = list1.begin(), it2; 409 efl::eina::ptr_list<int>::iterator it = list1.begin(), it2;
413 410
414 it = list1.erase(it); 411 it = list1.erase(it);
@@ -425,7 +422,7 @@ START_TEST(eina_cxx_ptrlist_erase)
425 ck_assert(it == it2); 422 ck_assert(it == it2);
426 ck_assert(list1.size() == 4); 423 ck_assert(list1.size() == 4);
427 ck_assert(*it2 == 20); 424 ck_assert(*it2 == 20);
428 425
429 it = list1.end(); 426 it = list1.end();
430 --it; 427 --it;
431 it = list1.erase(it); 428 it = list1.erase(it);
@@ -460,7 +457,7 @@ START_TEST(eina_cxx_ptrlist_range)
460 list.push_back(new int(30)); 457 list.push_back(new int(30));
461 458
462 efl::eina::range_ptr_list<int> range_list(list); 459 efl::eina::range_ptr_list<int> range_list(list);
463 460
464 ck_assert(range_list.size() == 6u); 461 ck_assert(range_list.size() == 6u);
465 462
466 int result[] = {5, 10, 15, 20, 25, 30}; 463 int result[] = {5, 10, 15, 20, 25, 30};
diff --git a/src/tests/eina_cxx/eina_cxx_test_stringshare.cc b/src/tests/eina_cxx/eina_cxx_test_stringshare.cc
index d10ad36..11bce25 100644
--- a/src/tests/eina_cxx/eina_cxx_test_stringshare.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_stringshare.cc
@@ -3,12 +3,11 @@
3# include <config.h> 3# include <config.h>
4#endif 4#endif
5 5
6#include "Eina.hh"
7
8#include <algorithm>
9#include <functional> 6#include <functional>
10 7
11#include <check.h> 8#include <Eina.hh>
9
10#include "eina_cxx_suite.h"
12 11
13START_TEST(eina_cxx_stringshare_constructors) 12START_TEST(eina_cxx_stringshare_constructors)
14{ 13{
diff --git a/src/tests/eina_cxx/eina_cxx_test_thread.cc b/src/tests/eina_cxx/eina_cxx_test_thread.cc
index abf1c7a..f464c26 100644
--- a/src/tests/eina_cxx/eina_cxx_test_thread.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_thread.cc
@@ -1,13 +1,10 @@
1
2#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
3# include <config.h> 2# include <config.h>
4#endif 3#endif
5 4
6#include "Eina.hh" 5#include <Eina.hh>
7
8#include <algorithm>
9 6
10#include <check.h> 7#include "eina_cxx_suite.h"
11 8
12bool no_args = false 9bool no_args = false
13 , args_1 = false 10 , args_1 = false
diff --git a/src/tests/eina_cxx/eina_cxx_test_value.cc b/src/tests/eina_cxx/eina_cxx_test_value.cc
index d57980a..d4864b6 100644
--- a/src/tests/eina_cxx/eina_cxx_test_value.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_value.cc
@@ -1,11 +1,10 @@
1
2#ifdef HAVE_CONFIG_H 1#ifdef HAVE_CONFIG_H
3# include <config.h> 2# include <config.h>
4#endif 3#endif
5 4
6#include "Eina.hh" 5#include <Eina.hh>
7 6
8#include <check.h> 7#include "eina_cxx_suite.h"
9 8
10START_TEST(eina_cxx_value_constructors) 9START_TEST(eina_cxx_value_constructors)
11{ 10{