X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=ccan%2Ftime%2Ftest%2Frun-monotonic.c;fp=ccan%2Ftime%2Ftest%2Frun-monotonic.c;h=c9912a73a608a0fcc7b1c92d5b44d95e067b2652;hb=a7f2b2c4d3e62cbbcb71628363e39f6730fd8f5e;hp=787ca6820b4c5c1976cdcaae526475eb506fd48f;hpb=8b83ecf3a2c7f52e2f5a6e23d330fea43e917fce;p=ccan diff --git a/ccan/time/test/run-monotonic.c b/ccan/time/test/run-monotonic.c index 787ca682..c9912a73 100644 --- a/ccan/time/test/run-monotonic.c +++ b/ccan/time/test/run-monotonic.c @@ -7,7 +7,7 @@ int main(void) struct timemono t1, t2; struct timerel t3; - plan_tests(3); + plan_tests(5); /* Test time_mono */ t1 = time_mono(); @@ -21,5 +21,8 @@ int main(void) ok1(time_less(timemono_between(t1, t2), t3)); ok1(time_less(timemono_since(t1), t3)); + ok1(timemono_add(t1, t3).ts.tv_sec == t1.ts.tv_sec + 1); + ok1(timemono_add(t2, t3).ts.tv_nsec == t2.ts.tv_nsec); + return exit_status(); }