diff options
Diffstat (limited to 'tests/time_test.cpp')
-rw-r--r-- | tests/time_test.cpp | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/time_test.cpp b/tests/time_test.cpp index 12b1ea75e..241c4a0c4 100644 --- a/tests/time_test.cpp +++ b/tests/time_test.cpp @@ -27,34 +27,6 @@ #include "ScopedSignalHandler.h" -#if defined(__BIONIC__) // mktime_tz is a bionic extension. -#include <libc/private/bionic_time.h> -#endif // __BIONIC__ - -TEST(time, mktime_tz) { -#if defined(__BIONIC__) - struct tm epoch; - memset(&epoch, 0, sizeof(tm)); - epoch.tm_year = 1970 - 1900; - epoch.tm_mon = 1; - epoch.tm_mday = 1; - - // Alphabetically first. Coincidentally equivalent to UTC. - ASSERT_EQ(2678400, mktime_tz(&epoch, "Africa/Abidjan")); - - // Alphabetically last. Coincidentally equivalent to UTC. - ASSERT_EQ(2678400, mktime_tz(&epoch, "Zulu")); - - // Somewhere in the middle, not UTC. - ASSERT_EQ(2707200, mktime_tz(&epoch, "America/Los_Angeles")); - - // Missing. Falls back to UTC. - ASSERT_EQ(2678400, mktime_tz(&epoch, "PST")); -#else // __BIONIC__ - GTEST_LOG_(INFO) << "This test does nothing.\n"; -#endif // __BIONIC__ -} - TEST(time, gmtime) { time_t t = 0; tm* broken_down = gmtime(&t); @@ -108,9 +80,6 @@ TEST(time, mktime_10310929) { #if !defined(__LP64__) // 32-bit bionic stupidly had a signed 32-bit time_t. ASSERT_EQ(-1, mktime(&t)); -#if defined(__BIONIC__) - ASSERT_EQ(-1, mktime_tz(&t, "UTC")); -#endif #else // Everyone else should be using a signed 64-bit time_t. ASSERT_GE(sizeof(time_t) * 8, 64U); @@ -118,16 +87,10 @@ TEST(time, mktime_10310929) { setenv("TZ", "America/Los_Angeles", 1); tzset(); ASSERT_EQ(static_cast<time_t>(4108348800U), mktime(&t)); -#if defined(__BIONIC__) - ASSERT_EQ(static_cast<time_t>(4108320000U), mktime_tz(&t, "UTC")); -#endif setenv("TZ", "UTC", 1); tzset(); ASSERT_EQ(static_cast<time_t>(4108320000U), mktime(&t)); -#if defined(__BIONIC__) - ASSERT_EQ(static_cast<time_t>(4108348800U), mktime_tz(&t, "America/Los_Angeles")); -#endif #endif } |