summaryrefslogtreecommitdiff
path: root/src/tests/elementary/elm_code_test_text.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-03-26 14:19:28 -0400
committerStefan Schmidt <stefan@osg.samsung.com>2018-04-05 11:10:25 +0200
commitadc601aca2f0a16784af36bf6ae7dd20eeb33202 (patch)
treecac0a78fa40e88abb028b06d985c28bf89da269c /src/tests/elementary/elm_code_test_text.c
parentb340b5e49ccae48a7d5adbbfa301af39e232348c (diff)
tests: add instrumentation to existing tests to find slow tests
efl_check.h must be included and the EFL_START/END_TEST macros must be used in place of normal START/END_TEST macros timing is enabled when TIMING_ENABLED is set https://phab.enlightenment.org/w/improve_tests/ Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
Diffstat (limited to 'src/tests/elementary/elm_code_test_text.c')
-rw-r--r--src/tests/elementary/elm_code_test_text.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/tests/elementary/elm_code_test_text.c b/src/tests/elementary/elm_code_test_text.c
index 0ab22df..51716ce 100644
--- a/src/tests/elementary/elm_code_test_text.c
+++ b/src/tests/elementary/elm_code_test_text.c
@@ -8,7 +8,7 @@
8#include "Elementary.h" 8#include "Elementary.h"
9#include "elm_code_text.h" 9#include "elm_code_text.h"
10 10
11START_TEST (elm_code_text_get_test) 11EFL_START_TEST (elm_code_text_get_test)
12{ 12{
13 Elm_Code *code; 13 Elm_Code *code;
14 Elm_Code_File *file; 14 Elm_Code_File *file;
@@ -29,9 +29,9 @@ START_TEST (elm_code_text_get_test)
29 ck_assert_strn_eq("test", str, len); 29 ck_assert_strn_eq("test", str, len);
30 elm_shutdown(); 30 elm_shutdown();
31} 31}
32END_TEST 32EFL_END_TEST
33 33
34START_TEST (elm_code_text_insert_test) 34EFL_START_TEST (elm_code_text_insert_test)
35{ 35{
36 Elm_Code *code; 36 Elm_Code *code;
37 Elm_Code_File *file; 37 Elm_Code_File *file;
@@ -52,9 +52,9 @@ START_TEST (elm_code_text_insert_test)
52 ck_assert_strn_eq("testing", text, length); 52 ck_assert_strn_eq("testing", text, length);
53 elm_shutdown(); 53 elm_shutdown();
54} 54}
55END_TEST 55EFL_END_TEST
56 56
57START_TEST (elm_code_text_contains_test) 57EFL_START_TEST (elm_code_text_contains_test)
58{ 58{
59 Elm_Code *code; 59 Elm_Code *code;
60 Elm_Code_File *file; 60 Elm_Code_File *file;
@@ -75,9 +75,9 @@ START_TEST (elm_code_text_contains_test)
75 ck_assert_int_eq(EINA_TRUE, elm_code_line_text_contains(line, "...")); 75 ck_assert_int_eq(EINA_TRUE, elm_code_line_text_contains(line, "..."));
76 elm_shutdown(); 76 elm_shutdown();
77} 77}
78END_TEST 78EFL_END_TEST
79 79
80START_TEST (elm_code_text_strpos_test) 80EFL_START_TEST (elm_code_text_strpos_test)
81{ 81{
82 Elm_Code *code; 82 Elm_Code *code;
83 Elm_Code_File *file; 83 Elm_Code_File *file;
@@ -102,9 +102,9 @@ START_TEST (elm_code_text_strpos_test)
102 ck_assert_int_eq(13, elm_code_line_text_strpos(line, "...", 0)); 102 ck_assert_int_eq(13, elm_code_line_text_strpos(line, "...", 0));
103 elm_shutdown(); 103 elm_shutdown();
104} 104}
105END_TEST 105EFL_END_TEST
106 106
107START_TEST (elm_code_text_newline_position_test) 107EFL_START_TEST (elm_code_text_newline_position_test)
108{ 108{
109 short nllen; 109 short nllen;
110 const char *unixtext = "a test\nwith newline"; 110 const char *unixtext = "a test\nwith newline";
@@ -118,9 +118,9 @@ START_TEST (elm_code_text_newline_position_test)
118 ck_assert_int_eq(2, nllen); 118 ck_assert_int_eq(2, nllen);
119 elm_shutdown(); 119 elm_shutdown();
120} 120}
121END_TEST 121EFL_END_TEST
122 122
123START_TEST (elm_code_text_is_whitespace_test) 123EFL_START_TEST (elm_code_text_is_whitespace_test)
124{ 124{
125 const char *text; 125 const char *text;
126 126
@@ -136,7 +136,7 @@ START_TEST (elm_code_text_is_whitespace_test)
136 ck_assert_int_eq(0, elm_code_text_is_whitespace(text, strlen(text))); 136 ck_assert_int_eq(0, elm_code_text_is_whitespace(text, strlen(text)));
137 elm_shutdown(); 137 elm_shutdown();
138} 138}
139END_TEST 139EFL_END_TEST
140 140
141void elm_code_test_text(TCase *tc) 141void elm_code_test_text(TCase *tc)
142{ 142{