Add timespec -- add tests for it too.
This commit is contained in:
@ -1,18 +1,14 @@
|
||||
#include "test.h"
|
||||
|
||||
int test_failures = 0;
|
||||
int assert_count = 0;
|
||||
|
||||
uint32_t mqtt_pub_count;
|
||||
uint32_t mqtt_sub_count;
|
||||
|
||||
int main() {
|
||||
test_buttons();
|
||||
test_init();
|
||||
|
||||
if (test_failures) {
|
||||
LOG(LL_ERROR, ("%d test failures", test_failures));
|
||||
return -1;
|
||||
test_buttons();
|
||||
test_timespec();
|
||||
|
||||
LOG(LL_INFO, ("Tests run=%d (success=%d fail=%d)", test_count_total(), test_count_success(), test_count_fail()));
|
||||
if (test_count_total() == test_count_success()) {
|
||||
return 0;
|
||||
}
|
||||
LOG(LL_INFO, ("All tests passed, %d assertions OK", assert_count));
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user