Branch Coverage

t/api.cc
Criterion Covered Total %
branch 145 380 38.1


line true false branch
7 3 0 auto utc_tz = tzget("UTC");
8 3 0 SECTION("28-Dec-2018") {
3 0 SECTION("28-Dec-2018") {
3 0 SECTION("28-Dec-2018") {
3 0 SECTION("28-Dec-2018") {
1 2 SECTION("28-Dec-2018") {
10 1 0 REQUIRE(anytime(1545987968, &date, utc_tz));
1 0 REQUIRE(anytime(1545987968, &date, utc_tz));
1 0 REQUIRE(anytime(1545987968, &date, utc_tz));
1 0 REQUIRE(anytime(1545987968, &date, utc_tz));
1 0 REQUIRE(anytime(1545987968, &date, utc_tz));
0 0 REQUIRE(anytime(1545987968, &date, utc_tz));
0 0 REQUIRE(anytime(1545987968, &date, utc_tz));
11 1 0 REQUIRE(date.sec == 8);
1 0 REQUIRE(date.sec == 8);
1 0 REQUIRE(date.sec == 8);
1 0 REQUIRE(date.sec == 8);
1 0 REQUIRE(date.sec == 8);
0 0 REQUIRE(date.sec == 8);
0 0 REQUIRE(date.sec == 8);
12 1 0 REQUIRE(date.min == 6);
1 0 REQUIRE(date.min == 6);
1 0 REQUIRE(date.min == 6);
1 0 REQUIRE(date.min == 6);
1 0 REQUIRE(date.min == 6);
0 0 REQUIRE(date.min == 6);
0 0 REQUIRE(date.min == 6);
13 1 0 REQUIRE(date.hour == 9);
1 0 REQUIRE(date.hour == 9);
1 0 REQUIRE(date.hour == 9);
1 0 REQUIRE(date.hour == 9);
1 0 REQUIRE(date.hour == 9);
0 0 REQUIRE(date.hour == 9);
0 0 REQUIRE(date.hour == 9);
14 1 0 REQUIRE(date.mday == 28);
1 0 REQUIRE(date.mday == 28);
1 0 REQUIRE(date.mday == 28);
1 0 REQUIRE(date.mday == 28);
1 0 REQUIRE(date.mday == 28);
0 0 REQUIRE(date.mday == 28);
0 0 REQUIRE(date.mday == 28);
15 1 0 REQUIRE(date.mon == 11);
1 0 REQUIRE(date.mon == 11);
1 0 REQUIRE(date.mon == 11);
1 0 REQUIRE(date.mon == 11);
1 0 REQUIRE(date.mon == 11);
0 0 REQUIRE(date.mon == 11);
0 0 REQUIRE(date.mon == 11);
16 1 0 REQUIRE(date.yday == 361);
1 0 REQUIRE(date.yday == 361);
1 0 REQUIRE(date.yday == 361);
1 0 REQUIRE(date.yday == 361);
1 0 REQUIRE(date.yday == 361);
0 0 REQUIRE(date.yday == 361);
0 0 REQUIRE(date.yday == 361);
17 1 0 REQUIRE(date.year == 2018);
1 0 REQUIRE(date.year == 2018);
1 0 REQUIRE(date.year == 2018);
1 0 REQUIRE(date.year == 2018);
1 0 REQUIRE(date.year == 2018);
0 0 REQUIRE(date.year == 2018);
0 0 REQUIRE(date.year == 2018);
20 3 0 SECTION("negative boundary") {
3 0 SECTION("negative boundary") {
3 0 SECTION("negative boundary") {
3 0 SECTION("negative boundary") {
1 2 SECTION("negative boundary") {
22 1 0 REQUIRE(anytime(EPOCH_MIN - 1, &date, utc_tz) == false);
1 0 REQUIRE(anytime(EPOCH_MIN - 1, &date, utc_tz) == false);
1 0 REQUIRE(anytime(EPOCH_MIN - 1, &date, utc_tz) == false);
1 0 REQUIRE(anytime(EPOCH_MIN - 1, &date, utc_tz) == false);
1 0 REQUIRE(anytime(EPOCH_MIN - 1, &date, utc_tz) == false);
1 0 REQUIRE(anytime(EPOCH_MIN - 1, &date, utc_tz) == false);
0 0 REQUIRE(anytime(EPOCH_MIN - 1, &date, utc_tz) == false);
0 0 REQUIRE(anytime(EPOCH_MIN - 1, &date, utc_tz) == false);
23 1 0 REQUIRE(anytime(EPOCH_MIN, &date, utc_tz) == true);
1 0 REQUIRE(anytime(EPOCH_MIN, &date, utc_tz) == true);
1 0 REQUIRE(anytime(EPOCH_MIN, &date, utc_tz) == true);
1 0 REQUIRE(anytime(EPOCH_MIN, &date, utc_tz) == true);
1 0 REQUIRE(anytime(EPOCH_MIN, &date, utc_tz) == true);
1 0 REQUIRE(anytime(EPOCH_MIN, &date, utc_tz) == true);
0 0 REQUIRE(anytime(EPOCH_MIN, &date, utc_tz) == true);
0 0 REQUIRE(anytime(EPOCH_MIN, &date, utc_tz) == true);
24 1 0 REQUIRE(date.sec == 0);
1 0 REQUIRE(date.sec == 0);
1 0 REQUIRE(date.sec == 0);
1 0 REQUIRE(date.sec == 0);
1 0 REQUIRE(date.sec == 0);
0 0 REQUIRE(date.sec == 0);
0 0 REQUIRE(date.sec == 0);
25 1 0 REQUIRE(date.min == 0);
1 0 REQUIRE(date.min == 0);
1 0 REQUIRE(date.min == 0);
1 0 REQUIRE(date.min == 0);
1 0 REQUIRE(date.min == 0);
0 0 REQUIRE(date.min == 0);
0 0 REQUIRE(date.min == 0);
26 1 0 REQUIRE(date.hour == 0);
1 0 REQUIRE(date.hour == 0);
1 0 REQUIRE(date.hour == 0);
1 0 REQUIRE(date.hour == 0);
1 0 REQUIRE(date.hour == 0);
0 0 REQUIRE(date.hour == 0);
0 0 REQUIRE(date.hour == 0);
27 1 0 REQUIRE(date.mday == 2);
1 0 REQUIRE(date.mday == 2);
1 0 REQUIRE(date.mday == 2);
1 0 REQUIRE(date.mday == 2);
1 0 REQUIRE(date.mday == 2);
0 0 REQUIRE(date.mday == 2);
0 0 REQUIRE(date.mday == 2);
28 1 0 REQUIRE(date.mon == 0);
1 0 REQUIRE(date.mon == 0);
1 0 REQUIRE(date.mon == 0);
1 0 REQUIRE(date.mon == 0);
1 0 REQUIRE(date.mon == 0);
0 0 REQUIRE(date.mon == 0);
0 0 REQUIRE(date.mon == 0);
29 1 0 REQUIRE(date.year == -2147483648);
1 0 REQUIRE(date.year == -2147483648);
1 0 REQUIRE(date.year == -2147483648);
1 0 REQUIRE(date.year == -2147483648);
1 0 REQUIRE(date.year == -2147483648);
0 0 REQUIRE(date.year == -2147483648);
0 0 REQUIRE(date.year == -2147483648);
32 3 0 SECTION("positive boundary") {
3 0 SECTION("positive boundary") {
3 0 SECTION("positive boundary") {
3 0 SECTION("positive boundary") {
1 2 SECTION("positive boundary") {
34 1 0 REQUIRE(anytime(EPOCH_MAX + 1, &date, utc_tz) == false);
1 0 REQUIRE(anytime(EPOCH_MAX + 1, &date, utc_tz) == false);
1 0 REQUIRE(anytime(EPOCH_MAX + 1, &date, utc_tz) == false);
1 0 REQUIRE(anytime(EPOCH_MAX + 1, &date, utc_tz) == false);
1 0 REQUIRE(anytime(EPOCH_MAX + 1, &date, utc_tz) == false);
1 0 REQUIRE(anytime(EPOCH_MAX + 1, &date, utc_tz) == false);
0 0 REQUIRE(anytime(EPOCH_MAX + 1, &date, utc_tz) == false);
0 0 REQUIRE(anytime(EPOCH_MAX + 1, &date, utc_tz) == false);
35 1 0 REQUIRE(anytime(EPOCH_MAX, &date, utc_tz) == true);
1 0 REQUIRE(anytime(EPOCH_MAX, &date, utc_tz) == true);
1 0 REQUIRE(anytime(EPOCH_MAX, &date, utc_tz) == true);
1 0 REQUIRE(anytime(EPOCH_MAX, &date, utc_tz) == true);
1 0 REQUIRE(anytime(EPOCH_MAX, &date, utc_tz) == true);
1 0 REQUIRE(anytime(EPOCH_MAX, &date, utc_tz) == true);
0 0 REQUIRE(anytime(EPOCH_MAX, &date, utc_tz) == true);
0 0 REQUIRE(anytime(EPOCH_MAX, &date, utc_tz) == true);
36 1 0 REQUIRE(date.sec == 59);
1 0 REQUIRE(date.sec == 59);
1 0 REQUIRE(date.sec == 59);
1 0 REQUIRE(date.sec == 59);
1 0 REQUIRE(date.sec == 59);
0 0 REQUIRE(date.sec == 59);
0 0 REQUIRE(date.sec == 59);
37 1 0 REQUIRE(date.min == 59);
1 0 REQUIRE(date.min == 59);
1 0 REQUIRE(date.min == 59);
1 0 REQUIRE(date.min == 59);
1 0 REQUIRE(date.min == 59);
0 0 REQUIRE(date.min == 59);
0 0 REQUIRE(date.min == 59);
38 1 0 REQUIRE(date.hour == 23);
1 0 REQUIRE(date.hour == 23);
1 0 REQUIRE(date.hour == 23);
1 0 REQUIRE(date.hour == 23);
1 0 REQUIRE(date.hour == 23);
0 0 REQUIRE(date.hour == 23);
0 0 REQUIRE(date.hour == 23);
39 1 0 REQUIRE(date.mday == 30);
1 0 REQUIRE(date.mday == 30);
1 0 REQUIRE(date.mday == 30);
1 0 REQUIRE(date.mday == 30);
1 0 REQUIRE(date.mday == 30);
0 0 REQUIRE(date.mday == 30);
0 0 REQUIRE(date.mday == 30);
40 1 0 REQUIRE(date.mon == 11);
1 0 REQUIRE(date.mon == 11);
1 0 REQUIRE(date.mon == 11);
1 0 REQUIRE(date.mon == 11);
1 0 REQUIRE(date.mon == 11);
0 0 REQUIRE(date.mon == 11);
0 0 REQUIRE(date.mon == 11);
41 1 0 REQUIRE(date.year == 2147483647);
1 0 REQUIRE(date.year == 2147483647);
1 0 REQUIRE(date.year == 2147483647);
1 0 REQUIRE(date.year == 2147483647);
1 0 REQUIRE(date.year == 2147483647);
0 0 REQUIRE(date.year == 2147483647);
0 0 REQUIRE(date.year == 2147483647);
43 26 0 }
26 0 }