summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2016-12-12 12:17:56 +0000
committerAndy Williams <andy@andywilliams.me>2016-12-12 14:01:20 +0000
commit780da3c87868c303d9c1051366bf3c9cd425c476 (patch)
treeb1f98af0145e26a392e9ac830d05c54eb0ae0488
parent8415626397573e69b2ca8c42a72625c14607d0c7 (diff)
elm_code: Fix tests for parameter reordering
Apologies for the badness of not running the tests before
-rw-r--r--src/lib/elementary/elm_code_widget.c2
-rw-r--r--src/tests/elementary/elm_code_test_widget_undo.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c
index 9a346e44fe..0132dc0d09 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -2056,7 +2056,7 @@ _elm_code_widget_tab_inserts_spaces_get(Eo *obj EINA_UNUSED, Elm_Code_Widget_Dat
2056EOLIAN static void 2056EOLIAN static void
2057_elm_code_widget_cursor_position_set(Eo *obj, Elm_Code_Widget_Data *pd, unsigned int row, unsigned int col) 2057_elm_code_widget_cursor_position_set(Eo *obj, Elm_Code_Widget_Data *pd, unsigned int row, unsigned int col)
2058{ 2058{
2059 _elm_code_widget_cursor_move(obj, pd, row, col, EINA_FALSE); 2059 _elm_code_widget_cursor_move(obj, pd, col, row, EINA_FALSE);
2060} 2060}
2061 2061
2062EOLIAN static void 2062EOLIAN static void
diff --git a/src/tests/elementary/elm_code_test_widget_undo.c b/src/tests/elementary/elm_code_test_widget_undo.c
index ddfc7b0ff4..ec442456c1 100644
--- a/src/tests/elementary/elm_code_test_widget_undo.c
+++ b/src/tests/elementary/elm_code_test_widget_undo.c
@@ -35,7 +35,7 @@ START_TEST (elm_code_test_widget_undo_text_insert)
35 content = elm_code_line_text_get(line, &length); 35 content = elm_code_line_text_get(line, &length);
36 ck_assert_strn_eq("test", content, length); 36 ck_assert_strn_eq("test", content, length);
37 37
38 elm_code_widget_cursor_position_set(widget, 3, 1); 38 elm_code_widget_cursor_position_set(widget, 1, 3);
39 _elm_code_widget_text_at_cursor_insert(widget, "r", 1); 39 _elm_code_widget_text_at_cursor_insert(widget, "r", 1);
40 content = elm_code_line_text_get(line, &length); 40 content = elm_code_line_text_get(line, &length);
41 ck_assert_strn_eq("terst", content, length); 41 ck_assert_strn_eq("terst", content, length);
@@ -44,7 +44,7 @@ START_TEST (elm_code_test_widget_undo_text_insert)
44 content = elm_code_line_text_get(line, &length); 44 content = elm_code_line_text_get(line, &length);
45 ck_assert_strn_eq("test", content, length); 45 ck_assert_strn_eq("test", content, length);
46 46
47 elm_code_widget_cursor_position_set(widget, 4, 1); 47 elm_code_widget_cursor_position_set(widget, 1, 4);
48 _elm_code_widget_text_at_cursor_insert(widget, "\t", 1); 48 _elm_code_widget_text_at_cursor_insert(widget, "\t", 1);
49 content = elm_code_line_text_get(line, &length); 49 content = elm_code_line_text_get(line, &length);
50 ck_assert_strn_eq("tes\tt", content, length); 50 ck_assert_strn_eq("tes\tt", content, length);
@@ -113,7 +113,7 @@ START_TEST (elm_code_test_widget_undo_newline)
113 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC); 113 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
114 widget = elm_code_widget_add(win, code); 114 widget = elm_code_widget_add(win, code);
115 115
116 elm_code_widget_cursor_position_set(widget, 5, 1); 116 elm_code_widget_cursor_position_set(widget, 1, 5);
117 _elm_code_widget_newline(widget); 117 _elm_code_widget_newline(widget);
118 ck_assert_int_eq(2, elm_code_file_lines_get(file)); 118 ck_assert_int_eq(2, elm_code_file_lines_get(file));
119 line = elm_code_file_line_get(file, 1); 119 line = elm_code_file_line_get(file, 1);
@@ -150,7 +150,7 @@ START_TEST (elm_code_test_widget_undo_delete)
150 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC); 150 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
151 widget = elm_code_widget_add(win, code); 151 widget = elm_code_widget_add(win, code);
152 152
153 elm_code_widget_cursor_position_set(widget, 4, 1); 153 elm_code_widget_cursor_position_set(widget, 1, 4);
154 _elm_code_widget_backspace(widget); 154 _elm_code_widget_backspace(widget);
155 155
156 line = elm_code_file_line_get(file, 1); 156 line = elm_code_file_line_get(file, 1);
@@ -161,7 +161,7 @@ START_TEST (elm_code_test_widget_undo_delete)
161 content = elm_code_line_text_get(line, &length); 161 content = elm_code_line_text_get(line, &length);
162 ck_assert_strn_eq("test", content, length); 162 ck_assert_strn_eq("test", content, length);
163 163
164 elm_code_widget_cursor_position_set(widget, 2, 1); 164 elm_code_widget_cursor_position_set(widget, 1, 2);
165 _elm_code_widget_delete(widget); 165 _elm_code_widget_delete(widget);
166 166
167 line = elm_code_file_line_get(file, 1); 167 line = elm_code_file_line_get(file, 1);
@@ -172,7 +172,7 @@ START_TEST (elm_code_test_widget_undo_delete)
172 content = elm_code_line_text_get(line, &length); 172 content = elm_code_line_text_get(line, &length);
173 ck_assert_strn_eq("test", content, length); 173 ck_assert_strn_eq("test", content, length);
174 174
175 elm_code_widget_cursor_position_set(widget, 4, 1); 175 elm_code_widget_cursor_position_set(widget, 1, 4);
176 _elm_code_widget_text_at_cursor_insert(widget, "\t", 1); 176 _elm_code_widget_text_at_cursor_insert(widget, "\t", 1);
177 _elm_code_widget_backspace(widget); 177 _elm_code_widget_backspace(widget);
178 content = elm_code_line_text_get(line, &length); 178 content = elm_code_line_text_get(line, &length);
@@ -181,7 +181,7 @@ START_TEST (elm_code_test_widget_undo_delete)
181 content = elm_code_line_text_get(line, &length); 181 content = elm_code_line_text_get(line, &length);
182 ck_assert_strn_eq("tes\tt", content, length); 182 ck_assert_strn_eq("tes\tt", content, length);
183 183
184 elm_code_widget_cursor_position_set(widget, 4, 1); 184 elm_code_widget_cursor_position_set(widget, 1, 4);
185 _elm_code_widget_delete(widget); 185 _elm_code_widget_delete(widget);
186 content = elm_code_line_text_get(line, &length); 186 content = elm_code_line_text_get(line, &length);
187 ck_assert_strn_eq("test", content, length); 187 ck_assert_strn_eq("test", content, length);
@@ -212,7 +212,7 @@ START_TEST (elm_code_test_widget_undo_delete_multiple)
212 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC); 212 win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
213 widget = elm_code_widget_add(win, code); 213 widget = elm_code_widget_add(win, code);
214 214
215 elm_code_widget_cursor_position_set(widget, 4, 1); 215 elm_code_widget_cursor_position_set(widget, 1, 4);
216 _elm_code_widget_backspace(widget); 216 _elm_code_widget_backspace(widget);
217 _elm_code_widget_backspace(widget); 217 _elm_code_widget_backspace(widget);
218 218