summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-01-16 02:10:21 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-01-16 02:10:21 +0900
commitb29e1d8989bf4553fd768451ff5f3a62d6e9ca0a (patch)
tree619a967cc144cb49967edf5d221349a9a46d5f1b /src/bin
parent421e368bb44061d9dfe0e1e83b700af5ec5babaa (diff)
test: Cleaned up elementary_test internal code.
- removed unnecessary/unused macro. - fixed formatting. - added prefix '_' for internal function.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/test.c4
-rw-r--r--src/bin/test.h21
2 files changed, 5 insertions, 20 deletions
diff --git a/src/bin/test.c b/src/bin/test.c
index 589c5f713..6de3df841 100644
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -247,7 +247,7 @@ struct elm_test
247}; 247};
248 248
249static int 249static int
250elm_test_sort(const void *pa, const void *pb) 250_elm_test_sort(const void *pa, const void *pb)
251{ 251{
252 const struct elm_test *a = pa, *b = pb; 252 const struct elm_test *a = pa, *b = pb;
253 int res = strcasecmp(a->category, b->category); 253 int res = strcasecmp(a->category, b->category);
@@ -263,7 +263,7 @@ _elm_test_add(Eina_List **p_list, const char *icon, const char *category, const
263 t->category = category; 263 t->category = category;
264 t->name = name; 264 t->name = name;
265 t->cb = cb; 265 t->cb = cb;
266 *p_list = eina_list_sorted_insert(*p_list, elm_test_sort, t); 266 *p_list = eina_list_sorted_insert(*p_list, _elm_test_sort, t);
267} 267}
268 268
269void 269void
diff --git a/src/bin/test.h b/src/bin/test.h
index 1b34c95f5..a5e78bb56 100644
--- a/src/bin/test.h
+++ b/src/bin/test.h
@@ -1,27 +1,12 @@
1#ifndef _TEST_H 1#ifndef _TEST_H
2#define _TEST_H 2#define _TEST_H
3 3
4#define fail_if(expr) \
5 do { \
6 if ( expr ) \
7 { \
8 FILE *fp; \
9 char buf[1024]; \
10 sprintf(buf, "fail_%s.txt", elm_win_title_get(win)); \
11 if ((fp = fopen(buf, "a")) != NULL) \
12 { \
13 fprintf(fp, "Failed at %s:%d on <%s>\n", \
14 __FILE__, __LINE__, #expr); \
15 fclose(fp); \
16 } \
17 } \
18 } while(0)
19#endif
20
21extern int _log_domain; 4extern int _log_domain;
22 5
23#define CRI(...) EINA_LOG_DOM_CRIT(_log_domain, _VA_ARGS__) 6#define CRI(...) EINA_LOG_DOM_CRIT(_log_domain, _VA_ARGS__)
24#define ERR(...) EINA_LOG_DOM_ERR(_log_domain, __VA_ARGS__) 7#define ERR(...) EINA_LOG_DOM_ERR(_log_domain, __VA_ARGS__)
25#define WRN(...) EINA_LOG_DOM_WARN(_log_domain, __VA_ARGS__) 8#define WRN(...) EINA_LOG_DOM_WARN(_log_domain, __VA_ARGS__)
26#define INF(...) EINA_LOG_DOM_INFO(_log_domain, __VA_ARGS__) 9#define INF(...) EINA_LOG_DOM_INFO(_log_domain, __VA_ARGS__)
27#define DBG(...) EINA_LOG_DOM_DBG(_log_domain, __VA_ARGS__) 10#define DBG(...) EINA_LOG_DOM_DBG(_log_domain, __VA_ARGS__)
11
12#endif