Add timespec -- add tests for it too.

This commit is contained in:
Pim van Pelt
2018-10-28 12:47:42 +01:00
parent 9ee393bc8a
commit 3e3d9dcbe0
8 changed files with 492 additions and 33 deletions

View File

@ -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;
}