Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Unified Diff: base/time/time_unittest.cc

Issue 1446363003: Deleted OS_WIN and all Windows specific files from base. (Closed) Base URL: https://github.com/domokit/mojo.git@base_tests
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/time/time.h ('k') | base/time/time_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time_unittest.cc
diff --git a/base/time/time_unittest.cc b/base/time/time_unittest.cc
index b7e05b786b490bbb0ede2aabc3f09cffc990eb6a..a068dc32cf1dcc26a1285f80f11ce6c06dcaff0f 100644
--- a/base/time/time_unittest.cc
+++ b/base/time/time_unittest.cc
@@ -59,9 +59,7 @@ TEST_F(TimeTest, TimeT) {
// C library time and exploded time.
time_t now_t_1 = time(NULL);
struct tm tms;
-#if defined(OS_WIN)
- localtime_s(&tms, &now_t_1);
-#elif defined(OS_POSIX)
+#if defined(OS_POSIX)
localtime_r(&now_t_1, &tms);
#endif
@@ -169,10 +167,7 @@ TEST_F(TimeTest, ParseTimeTest1) {
const int BUFFER_SIZE = 64;
struct tm local_time = {0};
char time_buf[BUFFER_SIZE] = {0};
-#if defined(OS_WIN)
- localtime_s(&local_time, &current_time);
- asctime_s(time_buf, arraysize(time_buf), &local_time);
-#elif defined(OS_POSIX)
+#if defined(OS_POSIX)
localtime_r(&current_time, &local_time);
asctime_r(&local_time, time_buf);
#endif
@@ -572,17 +567,6 @@ TEST_F(TimeTest, MaxConversions) {
EXPECT_EQ(std::numeric_limits<CFAbsoluteTime>::infinity(),
t.ToCFAbsoluteTime());
#endif
-
-#if defined(OS_WIN)
- FILETIME ftime;
- ftime.dwHighDateTime = std::numeric_limits<DWORD>::max();
- ftime.dwLowDateTime = std::numeric_limits<DWORD>::max();
- t = Time::FromFileTime(ftime);
- EXPECT_TRUE(t.is_max());
- ftime = t.ToFileTime();
- EXPECT_EQ(std::numeric_limits<DWORD>::max(), ftime.dwHighDateTime);
- EXPECT_EQ(std::numeric_limits<DWORD>::max(), ftime.dwLowDateTime);
-#endif
}
#if defined(OS_MACOSX)
« no previous file with comments | « base/time/time.h ('k') | base/time/time_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698