mbpfan/tests/minunit.h

27 lines
751 B
C
Raw Normal View History

2012-06-16 09:02:48 +00:00
/**
* This is the MinUnit testing framework - http://www.jera.com/techinfo/jtns/jtn002.html
*/
2012-08-23 20:32:49 +00:00
#ifndef _MINUNIT_H_
#define _MINUNIT_H_
2012-08-23 20:32:49 +00:00
#define mu_assert(message, test) do { if (!(test)) return message; } while (0)
#define mu_run_test(test) do { const char *message = test(); tests_run++; \
if (message) return message; } while (0)
2012-06-16 09:02:48 +00:00
extern int tests_run;
2014-06-23 08:24:03 +00:00
2012-08-23 20:32:49 +00:00
static const char *test_sensor_paths();
static const char *test_fan_paths();
static const char *test_get_temp();
static const char *test_config_file();
2012-11-18 21:16:49 +00:00
static const char *test_settings();
static void handler(int signal);
static const char *test_sighup_receive();
static const char *test_settings_reload();
2012-08-23 20:32:49 +00:00
static const char *all_tests();
2012-06-16 09:02:48 +00:00
2012-08-23 20:32:49 +00:00
int tests();
2012-06-16 09:02:48 +00:00
2012-08-23 20:32:49 +00:00
#endif