00001 #ifndef TESTUTILS_H
00002 #define TESTUTILS_H
00003
00004 #define SUCCESS (0)
00005
00006 #define TEST_EQUAL(a, b, s) \
00007 test_equal(a, b, s, __FILE__, __FUNCTION__, __LINE__)
00008
00009 #define TEST_EQUAL_ONE_OF(a, b, c, s) \
00010 test_equal_one_of(a, b, c, s, __FILE__, __FUNCTION__, __LINE__)
00011
00012 #define TEST_NOT_EQUAL(a, b, s) \
00013 test_not_equal(a, b, s, __FILE__, __FUNCTION__, __LINE__)
00014
00015 #define TEST_NEGATIVE(a, s) \
00016 test_negative(a, s, __FILE__, __FUNCTION__, __LINE__)
00017
00018 #define TEST_POSITIVE(a, s) \
00019 test_positive(a, s, __FILE__, __FUNCTION__, __LINE__)
00020
00021 #define TEST_STATS() \
00022 test_print_stats( __FILE__, __FUNCTION__, __LINE__)
00023
00024 #define TEST_VERBOSE_ON() \
00025 test_verbose_on()
00026
00027 #define TEST_VERBOSE_OFF() \
00028 test_verbose_off()
00029
00030 void test_equal(int ret_val, int expected_val, const char *str,
00031 const char *file, const char* func, int line);
00032 void test_equal_one_of(int val, int expected_val1, int expected_val2, const char *str,
00033 const char *file, const char *func, int line);
00034 void test_positive(int ret_val, const char *str,
00035 const char *file, const char* func, int line);
00036 void test_negative(int ret_val, const char *str,
00037 const char *file, const char* func, int line);
00038 void test_not_equal(int ret_val, int expected_val, const char *str,
00039 const char *file, const char* func, int line);
00040 void test_print_stats(const char *file, const char* func, int line);
00041 void test_reset_stats(void);
00042 void test_verbose_on(void);
00043 void test_verbose_off(void);
00044
00045 #endif