Use CHECK instead of ECHO for several tests of time.c

This commit is contained in:
Stefan Kangas 2010-12-10 04:13:23 +01:00
parent 26bff0daa3
commit 16aed07977
2 changed files with 6 additions and 11 deletions

View file

@ -1,10 +1,5 @@
TESTING "Time conversion" ./test-time TESTING "Time conversion" ./test-time
TEST "basic functionality" basic <<END TEST "basic functionality" basic <<END
err: ECHO: .*: 0
err: ECHO: .*: 1
err: ECHO: .*: 0
err: ECHO: .*: 1
err: ECHO: .*: 0$
err: ECHO: .*: 03:55:20.700 err: ECHO: .*: 03:55:20.700
END END

View file

@ -40,17 +40,17 @@ const int HOURS = 3;
TEST (basic) { TEST (basic) {
// Zero // Zero
gavl_time_t t = lumiera_build_time(0,0,0,0); gavl_time_t t = lumiera_build_time(0,0,0,0);
ECHO ("%d", (int) t); CHECK ((gavl_time_t) t == 0);
// Non-zero // Non-zero
t = lumiera_build_time(MILLIS, SECONDS, MINUTES, HOURS); t = lumiera_build_time(MILLIS, SECONDS, MINUTES, HOURS);
ECHO("%d", lumiera_time_millis(t) == MILLIS); CHECK (lumiera_time_millis(t) == MILLIS);
ECHO("%d", lumiera_time_seconds(t) != SECONDS); CHECK (lumiera_time_seconds(t) == SECONDS);
ECHO("%d", lumiera_time_minutes(t) == MINUTES); CHECK (lumiera_time_minutes(t) == MINUTES);
ECHO("%d", lumiera_time_hours(t) != HOURS); CHECK (lumiera_time_hours(t) == HOURS);
ECHO("%s", lumiera_tmpbuf_print_time(t)); ECHO ("%s", lumiera_tmpbuf_print_time(t));
} }
TESTS_END TESTS_END