am 3db1f359: Merge "Add a trivial gmtime(3) test."
* commit '3db1f359e9f218f5f73a7a9f4d80e4be362a526e': Add a trivial gmtime(3) test.
This commit is contained in:
commit
7e56f462ad
@ -42,3 +42,15 @@ TEST(time, mktime_tz) {
|
||||
ASSERT_EQ(2678400, mktime_tz(&epoch, "PST"));
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST(time, gmtime) {
|
||||
time_t t = 0;
|
||||
tm* broken_down = gmtime(&t);
|
||||
ASSERT_TRUE(broken_down != NULL);
|
||||
ASSERT_EQ(0, broken_down->tm_sec);
|
||||
ASSERT_EQ(0, broken_down->tm_min);
|
||||
ASSERT_EQ(0, broken_down->tm_hour);
|
||||
ASSERT_EQ(1, broken_down->tm_mday);
|
||||
ASSERT_EQ(0, broken_down->tm_mon);
|
||||
ASSERT_EQ(1970, broken_down->tm_year + 1900);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user