eo_cxx: Fix do_eo_add after lifecycle branch.

Summary:
Also changed the previously failing tests to use ck_assert_int_eqinstead
of fail_if for better reporting.

Test Plan: make check

Reviewers: cedric, felipealmeida

Reviewed By: cedric

Subscribers: #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6194

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Lauro Moura 2018-05-25 10:00:40 -07:00 committed by Cedric BAIL
parent 455775c2e3
commit 7d4c5f5d7c
2 changed files with 7 additions and 7 deletions

View File

@ -837,7 +837,7 @@ void do_eo_add(Eo*& object, P const& parent, Efl_Class const* klass
, F&& f
, typename std::enable_if< eo::is_eolian_object<P>::value>::type* = 0)
{
bool is_ref = (parent._eo_ptr() != nullptr);
bool const is_ref = true;
object = ::_efl_add_internal_start(__FILE__, __LINE__, klass, parent._eo_ptr(), is_ref, EINA_FALSE);
::efl::eolian::call_lambda(std::forward<F>(f), proxy);
object = ::_efl_add_end(object, is_ref, EINA_FALSE);

View File

@ -24,8 +24,8 @@ START_TEST(eolian_cxx_test_binding_constructor_only_required)
}
);
fail_if(1 != g.req_ctor_a_value_get());
fail_if(2 != g.req_ctor_b_value_get());
ck_assert_int_eq(1, g.req_ctor_a_value_get());
ck_assert_int_eq(2, g.req_ctor_b_value_get());
}
END_TEST
@ -55,10 +55,10 @@ START_TEST(eolian_cxx_test_binding_constructor_all_optionals)
}
);
fail_if(2 != g.req_ctor_a_value_get());
fail_if(3 != g.opt_ctor_a_value_get());
fail_if(4 != g.req_ctor_b_value_get());
fail_if(5 != g.opt_ctor_b_value_get());
ck_assert_int_eq(2, g.req_ctor_a_value_get());
ck_assert_int_eq(3, g.opt_ctor_a_value_get());
ck_assert_int_eq(4, g.req_ctor_b_value_get());
ck_assert_int_eq(5, g.opt_ctor_b_value_get());
}
END_TEST