aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-10-16 13:07:26 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2018-10-16 13:08:21 +0200
commit7015dc03b47bc71f161e557c88a297530eb2f6df (patch)
tree6fae767421b7225574954425c93e560ba1be560f
parenteolian_cxx: PACKAGE_DATA_DIR is completly wrong here (diff)
downloadefl-7015dc03b47bc71f161e557c88a297530eb2f6df.tar.gz
eina_cxx: use efl_new instead of efl_add
Summary: parent is NULL, this results in a error. And a NULL object. This fixes that! Depends on https://phab.enlightenment.org/D7163 Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7164
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_accessor.cc16
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_ptrarray.cc48
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_ptrlist.cc44
3 files changed, 54 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 5978345dd8..7e3d8cfde9 100644
--- a/src/tests/eina_cxx/eina_cxx_test_accessor.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_accessor.cc
@@ -50,10 +50,10 @@ EFL_START_TEST(eina_cxx_eo_accessor_indexing)
efl::eina::list<wrapper> list;
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w4(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
+ wrapper const w4(efl_new(SIMPLE_CLASS));
list.push_back(w1);
list.push_back(w2);
@@ -104,10 +104,10 @@ EFL_START_TEST(eina_cxx_eo_accessor_iterator)
efl::eina::list<wrapper> list;
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w4(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
+ wrapper const w4(efl_new(SIMPLE_CLASS));
list.push_back(w1);
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 2cc1d2f85f..564b13db78 100644
--- a/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_ptrarray.cc
@@ -33,9 +33,9 @@ EFL_START_TEST(eina_cxx_ptrarray_push_back)
int result[] = {5, 10, 15};
int rresult[] = {15, 10, 5};
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
{
efl::eina::ptr_array<int> array;
@@ -109,9 +109,9 @@ EFL_START_TEST(eina_cxx_ptrarray_pop_back)
ck_assert(std::equal(array.rbegin(), array.rend(), rresult));
}
{
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
efl::eina::array<wrapper> array;
@@ -204,11 +204,11 @@ EFL_START_TEST(eina_cxx_ptrarray_insert)
ck_assert(std::equal(array.begin(), array.end(), array4.begin()));
}
{
- wrapper const w0(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w4(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w0(efl_new(SIMPLE_CLASS));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
+ wrapper const w4(efl_new(SIMPLE_CLASS));
efl::eina::array<wrapper> array;
ck_assert(std::distance(array.begin(), array.end()) == 0u);
@@ -284,7 +284,7 @@ EFL_START_TEST(eina_cxx_ptrarray_constructors)
efl::eina::eina_init eina_init;
efl::eo::eo_init eo_init;
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
{
efl::eina::ptr_array<int> array1;
@@ -363,12 +363,12 @@ EFL_START_TEST(eina_cxx_ptrarray_erase)
ck_assert(array1.back() == 25);
}
{
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w4(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w5(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w6(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
+ wrapper const w4(efl_new(SIMPLE_CLASS));
+ wrapper const w5(efl_new(SIMPLE_CLASS));
+ wrapper const w6(efl_new(SIMPLE_CLASS));
efl::eina::array<wrapper> array1;
@@ -444,12 +444,12 @@ EFL_START_TEST(eina_cxx_ptrarray_range)
}
{
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w4(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w5(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w6(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
+ wrapper const w4(efl_new(SIMPLE_CLASS));
+ wrapper const w5(efl_new(SIMPLE_CLASS));
+ wrapper const w6(efl_new(SIMPLE_CLASS));
efl::eina::array<wrapper> array;
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 9635c0efff..5c89d9549d 100644
--- a/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_ptrlist.cc
@@ -35,9 +35,9 @@ EFL_START_TEST(eina_cxx_ptrlist_push_back)
int result[] = {5, 10, 15};
int rresult[] = {15, 10, 5};
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
{
efl::eina::ptr_list<int> list;
@@ -84,9 +84,9 @@ EFL_START_TEST(eina_cxx_ptrlist_pop_back)
int result[] = {5, 10};
int rresult[] = {10, 5};
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
{
efl::eina::ptr_list<int> list;
@@ -150,9 +150,9 @@ EFL_START_TEST(eina_cxx_ptrlist_push_front)
ck_assert(std::equal(list.rbegin(), list.rend(), rresult));
}
{
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
efl::eina::list<wrapper> list;
@@ -178,9 +178,9 @@ EFL_START_TEST(eina_cxx_ptrlist_pop_front)
int result[] = {10, 5};
int rresult[] = {5, 10};
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
{
efl::eina::ptr_list<int> list;
@@ -280,11 +280,11 @@ EFL_START_TEST(eina_cxx_ptrlist_insert)
ck_assert(std::equal(list.begin(), list.end(), list4.begin()));
}
{
- wrapper const w0(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w4(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w0(efl_new(SIMPLE_CLASS));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
+ wrapper const w4(efl_new(SIMPLE_CLASS));
efl::eina::list<wrapper> list;
@@ -373,11 +373,11 @@ EFL_START_TEST(eina_cxx_ptrlist_constructors)
ck_assert(list2 == list4);
}
{
- wrapper const w0(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w1(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w2(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w3(efl_add(SIMPLE_CLASS, NULL));
- wrapper const w4(efl_add(SIMPLE_CLASS, NULL));
+ wrapper const w0(efl_new(SIMPLE_CLASS));
+ wrapper const w1(efl_new(SIMPLE_CLASS));
+ wrapper const w2(efl_new(SIMPLE_CLASS));
+ wrapper const w3(efl_new(SIMPLE_CLASS));
+ wrapper const w4(efl_new(SIMPLE_CLASS));
efl::eina::list<wrapper> list1;
ck_assert(list1.empty());