mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-08 18:36:17 +01:00
tests: Improve branch coverage when testing g_time_val_add()
While I’m here… Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
725eb1c86b
commit
6104e63ec4
@ -115,6 +115,14 @@ test_timeval_add (void)
|
||||
g_time_val_add (&time, 1000);
|
||||
g_assert_cmpint (time.tv_sec, ==, 1);
|
||||
g_assert_cmpint (time.tv_usec, ==, 510);
|
||||
|
||||
g_time_val_add (&time, 0);
|
||||
g_assert_cmpint (time.tv_sec, ==, 1);
|
||||
g_assert_cmpint (time.tv_usec, ==, 510);
|
||||
|
||||
g_time_val_add (&time, -210);
|
||||
g_assert_cmpint (time.tv_sec, ==, 1);
|
||||
g_assert_cmpint (time.tv_usec, ==, 300);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
|
Loading…
Reference in New Issue
Block a user