"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/misc_tests.c" between
vnstat-2.7.tar.gz and vnstat-2.8.tar.gz

About: vnStat is a console-based network traffic monitor (using the /proc filesystem).

misc_tests.c  (vnstat-2.7):misc_tests.c  (vnstat-2.8)
skipping to change at line 896 skipping to change at line 896
rx = 1; rx = 1;
tx = 2; tx = 2;
getestimates(&rx, &tx, LT_Year, updated, &datalist); getestimates(&rx, &tx, LT_Year, updated, &datalist);
ck_assert_int_eq(rx, 32061600); ck_assert_int_eq(rx, 32061600);
ck_assert_int_eq(tx, 64648800); ck_assert_int_eq(tx, 64648800);
dbdatalistfree(&datalist); dbdatalistfree(&datalist);
} }
END_TEST END_TEST
START_TEST(ishelprequest_knows_what_a_help_request_is)
{
ck_assert_int_eq(ishelprequest("--help"), 1);
ck_assert_int_eq(ishelprequest("-?"), 1);
ck_assert_int_eq(ishelprequest("?"), 1);
ck_assert_int_eq(ishelprequest("help"), 0);
ck_assert_int_eq(ishelprequest("-h"), 0);
ck_assert_int_eq(ishelprequest("--helpme"), 0);
ck_assert_int_eq(ishelprequest(""), 0);
ck_assert_int_eq(ishelprequest("1"), 0);
ck_assert_int_eq(ishelprequest("a"), 0);
}
END_TEST
void add_misc_tests(Suite *s) void add_misc_tests(Suite *s)
{ {
TCase *tc_misc = tcase_create("Misc"); TCase *tc_misc = tcase_create("Misc");
tcase_add_checked_fixture(tc_misc, setup, teardown); tcase_add_checked_fixture(tc_misc, setup, teardown);
tcase_add_unchecked_fixture(tc_misc, setup, teardown); tcase_add_unchecked_fixture(tc_misc, setup, teardown);
tcase_add_test(tc_misc, getbtime_does_not_return_zero); tcase_add_test(tc_misc, getbtime_does_not_return_zero);
tcase_add_loop_test(tc_misc, getunitprefix_returns_something_with_all_cfg _combinations, 0, 2); tcase_add_loop_test(tc_misc, getunitprefix_returns_something_with_all_cfg _combinations, 0, 2);
tcase_add_loop_test(tc_misc, getrateunitprefix_returns_something_with_all _cfg_combinations, 0, 3); tcase_add_loop_test(tc_misc, getrateunitprefix_returns_something_with_all _cfg_combinations, 0, 3);
tcase_add_loop_test(tc_misc, getunitdivisor_returns_something_with_all_cf g_combinations, 0, 3); tcase_add_loop_test(tc_misc, getunitdivisor_returns_something_with_all_cf g_combinations, 0, 3);
tcase_add_test(tc_misc, spacecheck_does_not_check_when_not_configured); tcase_add_test(tc_misc, spacecheck_does_not_check_when_not_configured);
skipping to change at line 933 skipping to change at line 947
tcase_add_test(tc_misc, issametimeslot_knows_the_none_list); tcase_add_test(tc_misc, issametimeslot_knows_the_none_list);
tcase_add_test(tc_misc, issametimeslot_handles_updates_before_the_entry_t ime); tcase_add_test(tc_misc, issametimeslot_handles_updates_before_the_entry_t ime);
tcase_add_test(tc_misc, issametimeslot_knows_simple_slots); tcase_add_test(tc_misc, issametimeslot_knows_simple_slots);
tcase_add_test(tc_misc, issametimeslot_knows_its_slots); tcase_add_test(tc_misc, issametimeslot_knows_its_slots);
tcase_add_test(tc_misc, getperiodseconds_knows_fixed_not_ongoing_periods) ; tcase_add_test(tc_misc, getperiodseconds_knows_fixed_not_ongoing_periods) ;
tcase_add_test(tc_misc, getperiodseconds_knows_dynamic_not_ongoing_period s); tcase_add_test(tc_misc, getperiodseconds_knows_dynamic_not_ongoing_period s);
tcase_add_test(tc_misc, getperiodseconds_returns_zero_when_there_is_no_ti me_spent); tcase_add_test(tc_misc, getperiodseconds_returns_zero_when_there_is_no_ti me_spent);
tcase_add_test(tc_misc, getperiodseconds_knows_spent_ongoing_time); tcase_add_test(tc_misc, getperiodseconds_knows_spent_ongoing_time);
tcase_add_test(tc_misc, getestimates_has_error_handling); tcase_add_test(tc_misc, getestimates_has_error_handling);
tcase_add_test(tc_misc, getestimates_has_a_crystal_ball); tcase_add_test(tc_misc, getestimates_has_a_crystal_ball);
tcase_add_test(tc_misc, ishelprequest_knows_what_a_help_request_is);
suite_add_tcase(s, tc_misc); suite_add_tcase(s, tc_misc);
} }
 End of changes. 2 change blocks. 
0 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)