1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
#include <call-ui.h>
static void
test_utils (void)
{
char *duration;
duration = cui_call_format_duration (0);
g_assert_cmpstr (duration, ==, "00:00");
g_free (duration);
duration = cui_call_format_duration (600.03);
g_assert_cmpstr (duration, ==, "10:00");
g_free (duration);
duration = cui_call_format_duration (3600.00);
g_assert_cmpstr (duration, ==, "60:00");
g_free (duration);
duration = cui_call_format_duration (3601.00);
g_assert_cmpstr (duration, ==, "1:00:01");
g_free (duration);
}
int
main (int argc,
char *argv[])
{
int retval;
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/CallUI/utils", test_utils);
retval = g_test_run ();
cui_uninit ();
return retval;
}
|