rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=5cf38647a16d3537d25e0ec89335b9a9286f99c6

commit 5cf38647a16d3537d25e0ec89335b9a9286f99c6
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Wed Mar 16 11:49:41 2016 +0200

    UTC: update change tests
    
    change function prototypes
    functions shouldn't return false
---
 tests/test_change/change_diff_add.c       | 24 ++++++++++++------------
 tests/test_change/change_diff_merge_add.c |  4 ++--
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/tests/test_change/change_diff_add.c 
b/tests/test_change/change_diff_add.c
index 6241dad..eef4202 100644
--- a/tests/test_change/change_diff_add.c
+++ b/tests/test_change/change_diff_add.c
@@ -34,7 +34,7 @@ static Evas_Object *pseudo_object;
 /* test stubs that check args, return specified value, and report what 
function was called */
 static int _function_type_int_undo_return_true_called = 0;
 static Eina_Bool
-_function_type_int_undo_return_true(Evas_Object *obj, int val)
+_function_type_int_undo_return_true(Evas_Object *obj, Change *change 
__UNUSED__, Eina_Bool merge __UNUSED__, int val)
 {
    ck_assert(obj == pseudo_object);
    ck_assert(val == 42);
@@ -44,7 +44,7 @@ _function_type_int_undo_return_true(Evas_Object *obj, int val)
 
 static int _function_type_int_redo_return_true_called = 0;
 static Eina_Bool
-_function_type_int_redo_return_true(Evas_Object *obj, int val)
+_function_type_int_redo_return_true(Evas_Object *obj, Change *change 
__UNUSED__, Eina_Bool merge __UNUSED__, int val)
 {
    ck_assert(obj == pseudo_object);
    ck_assert(val == 42);
@@ -52,14 +52,14 @@ _function_type_int_redo_return_true(Evas_Object *obj, int 
val)
    return true;
 }
 
-static int _function_type_int_redo_return_false_called = 0;
+static int _function_type_int_redo_return_true2_called = 0;
 static Eina_Bool
-_function_type_int_redo_return_false(Evas_Object *obj, int val)
+_function_type_int_redo_return_true2(Evas_Object *obj, Change *change 
__UNUSED__, Eina_Bool merge __UNUSED__, int val)
 {
    ck_assert(obj == pseudo_object);
    ck_assert(val == 24);
-   _function_type_int_redo_return_false_called++;
-   return false;
+   _function_type_int_redo_return_true2_called++;
+   return true;
 }
 
 /**
@@ -72,7 +72,7 @@ _function_type_int_redo_return_false(Evas_Object *obj, int 
val)
  * @precondition
  * @step 1 init eina
  * @step 2 add change
- * @step 3 create two diffs. second diff should have redo function returning 
false
+ * @step 3 create two diffs.
  *
  * @procedure
  * @step 1 add one diff with change_diff_add
@@ -83,9 +83,9 @@ _function_type_int_redo_return_false(Evas_Object *obj, int 
val)
  * @step 6 add second diff
  * @step 7 change_undo should return true
  * @step 8 check that undo func was called twice more
- * @step 9 change_redo should return false
+ * @step 9 change_redo should return true
  * @step 10 check that redo_true func was called once
- * @step 11 check that redo_false func was called once
+ * @step 11 check that redo_true2 func was called once
  * </td>
  * <td>change</td>
  * <td>All checks passed</td>
@@ -115,7 +115,7 @@ EFLETE_TEST (change_diff_add_test_p)
    d2->undo.function = _function_type_int_undo_return_true;
    d2->undo.args.type_i.i1 = 42;
    d2->redo.type = FUNCTION_TYPE_INT;
-   d2->redo.function = _function_type_int_redo_return_false;
+   d2->redo.function = _function_type_int_redo_return_true2;
    d2->redo.args.type_i.i1 = 24;
 
    change_diff_add(change, d1);
@@ -126,9 +126,9 @@ EFLETE_TEST (change_diff_add_test_p)
    change_diff_add(change, d2);
    ck_assert(change_undo(pseudo_object, change) == true);
    ck_assert(_function_type_int_undo_return_true_called == 3);
-   ck_assert(change_redo(pseudo_object, change) == false);
+   ck_assert(change_redo(pseudo_object, change) == true);
    ck_assert(_function_type_int_redo_return_true_called == 2);
-   ck_assert(_function_type_int_redo_return_false_called == 1);
+   ck_assert(_function_type_int_redo_return_true2_called == 1);
    eina_shutdown();
 }
 END_TEST
diff --git a/tests/test_change/change_diff_merge_add.c 
b/tests/test_change/change_diff_merge_add.c
index 33ccf79..48dbb22 100644
--- a/tests/test_change/change_diff_merge_add.c
+++ b/tests/test_change/change_diff_merge_add.c
@@ -34,7 +34,7 @@ static Evas_Object *pseudo_object;
 /* test stubs that check args, return specified value, and report what 
function was called */
 static int _function_type_int_undo_return_true_called = 0;
 static Eina_Bool
-_function_type_int_undo_return_true(Evas_Object *obj, int val)
+_function_type_int_undo_return_true(Evas_Object *obj, Change *change 
__UNUSED__, Eina_Bool merge __UNUSED__, int val)
 {
    ck_assert(obj == pseudo_object);
    ck_assert(val == 42);
@@ -44,7 +44,7 @@ _function_type_int_undo_return_true(Evas_Object *obj, int val)
 
 static int _function_type_int_redo_return_true_called = 0;
 static Eina_Bool
-_function_type_int_redo_return_true(Evas_Object *obj, int val)
+_function_type_int_redo_return_true(Evas_Object *obj, Change *change 
__UNUSED__, Eina_Bool merge __UNUSED__, int val)
 {
    ck_assert(obj == pseudo_object);
    ck_assert(val == 24);

-- 


Reply via email to