forked from enlightenment/efl
test: Cleaned up elementary_test internal code.
- removed unnecessary/unused macro. - fixed formatting. - added prefix '_' for internal function.
This commit is contained in:
parent
e62d226ccf
commit
b1743d7d16
|
@ -247,7 +247,7 @@ struct elm_test
|
|||
};
|
||||
|
||||
static int
|
||||
elm_test_sort(const void *pa, const void *pb)
|
||||
_elm_test_sort(const void *pa, const void *pb)
|
||||
{
|
||||
const struct elm_test *a = pa, *b = pb;
|
||||
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
|
|||
t->category = category;
|
||||
t->name = name;
|
||||
t->cb = cb;
|
||||
*p_list = eina_list_sorted_insert(*p_list, elm_test_sort, t);
|
||||
*p_list = eina_list_sorted_insert(*p_list, _elm_test_sort, t);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,27 +1,12 @@
|
|||
#ifndef _TEST_H
|
||||
#define _TEST_H
|
||||
|
||||
#define fail_if(expr) \
|
||||
do { \
|
||||
if ( expr ) \
|
||||
{ \
|
||||
FILE *fp; \
|
||||
char buf[1024]; \
|
||||
sprintf(buf, "fail_%s.txt", elm_win_title_get(win)); \
|
||||
if ((fp = fopen(buf, "a")) != NULL) \
|
||||
{ \
|
||||
fprintf(fp, "Failed at %s:%d on <%s>\n", \
|
||||
__FILE__, __LINE__, #expr); \
|
||||
fclose(fp); \
|
||||
} \
|
||||
} \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
extern int _log_domain;
|
||||
|
||||
#define CRI(...) EINA_LOG_DOM_CRIT(_log_domain, _VA_ARGS__)
|
||||
#define CRI(...) EINA_LOG_DOM_CRIT(_log_domain, _VA_ARGS__)
|
||||
#define ERR(...) EINA_LOG_DOM_ERR(_log_domain, __VA_ARGS__)
|
||||
#define WRN(...) EINA_LOG_DOM_WARN(_log_domain, __VA_ARGS__)
|
||||
#define INF(...) EINA_LOG_DOM_INFO(_log_domain, __VA_ARGS__)
|
||||
#define DBG(...) EINA_LOG_DOM_DBG(_log_domain, __VA_ARGS__)
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue