diff options
author | Elliott Hughes <enh@google.com> | 2014-07-25 11:55:59 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-07-25 12:03:51 -0700 |
commit | 905e6d58aaf515bf237e62078f8a321920fe4c6b (patch) | |
tree | 07ee9fad11490db7e30bc27e359d5d1adf950cef /tests/time_test.cpp | |
parent | 123172ae370fe51e2d1fc26fe0aafa095af52919 (diff) | |
download | android_bionic-905e6d58aaf515bf237e62078f8a321920fe4c6b.tar.gz android_bionic-905e6d58aaf515bf237e62078f8a321920fe4c6b.tar.bz2 android_bionic-905e6d58aaf515bf237e62078f8a321920fe4c6b.zip |
Start hiding "private/bionic_time.h".
Bug: 15765976
Change-Id: Ibd9cf07067ec8dffe9fda6c3d498d4ab90708220
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 } |