path: root/src/tests
diff options
authorLauro Moura <lauromoura@expertisesolutions.com.br>2017-11-23 15:30:29 -0800
committerCedric Bail <cedric@osg.samsung.com>2017-11-23 15:30:32 -0800
commit0dbeb91bb90decd862e7c421c638c34dd91fc2de (patch)
treeb3e59d0bd018fbb3a7aaf97d7f4ba79a0bff3cfe /src/tests
parentecore: during fd cleanup we didn't remove freed fd handler from the ready fd ... (diff)
elementary: fix compilation of elm_code test on windows
Summary: Added some guards to avoid redefinition of functions. Partially fixes https://phab.enlightenment.org/T5866, as there is still the question whether we should test internal functions or not, as stated by jpeg in the comments. Reviewers: vtorri, felipealmeida, jpeg, cedric Reviewed By: cedric Subscribers: jenkins, cedric Maniphest Tasks: https://phab.enlightenment.org/T5866 Differential Revision: https://phab.enlightenment.org/D5521 Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
Diffstat (limited to 'src/tests')
1 files changed, 5 insertions, 0 deletions
diff --git a/src/tests/elementary/elm_code_test_widget.c b/src/tests/elementary/elm_code_test_widget.c
index 3a5860aeb0..c9fd6e8740 100644
--- a/src/tests/elementary/elm_code_test_widget.c
+++ b/src/tests/elementary/elm_code_test_widget.c
@@ -24,10 +24,15 @@
#undef DBG
#define DBG(...) do { } while (0);
+// Guard against multiple redefinitions on Windows
+#define ELM_CODE_TEST
#include "elm_code_parse.c"
#include "elm_code_widget_selection.c"
#include "elm_code_widget.c"
static void _assert_cell_type(Evas_Textgrid_Cell cell, Elm_Code_Token_Type type, int id)
ck_assert_msg(cell.fg == type, "Wrong type for cell %d", id);