mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-14 19:55:12 +01:00
tests/timer: Skip test_timeval_to_iso8601_overflow if we can't overflow a GTimeVal
On 32 bit systems, the size of a long might be the same as the size of an int. In that case, we won't be able to get an overflow when converting from a GTimeVal to a time_t. Skip the test for this in that case. Closes #1509 (cherry picked from commit f697f6aa08dc5499ae1c5c9177976cc62d19a998)
This commit is contained in:
parent
6a3fb3438d
commit
51e7219c54
@ -258,6 +258,12 @@ test_timeval_to_iso8601_overflow (void)
|
||||
GTimeVal val;
|
||||
gchar *out = NULL;
|
||||
|
||||
if ((glong) G_MAXINT == G_MAXLONG)
|
||||
{
|
||||
g_test_skip ("G_MAXINT == G_MAXLONG - we can't make g_time_val_to_iso8601() overflow.");
|
||||
return;
|
||||
}
|
||||
|
||||
g_unsetenv ("TZ");
|
||||
|
||||
val.tv_sec = G_MAXLONG;
|
||||
|
Loading…
x
Reference in New Issue
Block a user