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

Unified Diff: util/misc/clock_test.cc

Issue 838833004: win: Disable Clock tests that require SleepNanoseconds (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: ws Created 5 years, 11 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/misc/clock_test.cc
diff --git a/util/misc/clock_test.cc b/util/misc/clock_test.cc
index ffc5e4943a260c1f374c615ef2713275d5ea64f7..82ca85fa765c629f07d1ee5445c45a58058b4fe7 100644
--- a/util/misc/clock_test.cc
+++ b/util/misc/clock_test.cc
@@ -41,14 +41,18 @@ TEST(Clock, ClockMonotonicNanoseconds) {
EXPECT_GE(now, last);
}
+#if !defined(OS_WIN) // No SleepNanoseconds implemented on Windows.
// SleepNanoseconds() should sleep for at least the value of the clock’s
// resolution, so the clock’s value should definitely increase after a sleep.
// EXPECT_GT can be used instead of EXPECT_GE after the sleep.
SleepNanoseconds(1);
now = ClockMonotonicNanoseconds();
EXPECT_GT(now, start);
+#endif // OS_WIN
}
+#if !defined(OS_WIN) // No SleepNanoseconds implemented on Windows.
+
void TestSleepNanoseconds(uint64_t nanoseconds) {
uint64_t start = ClockMonotonicNanoseconds();
@@ -87,6 +91,8 @@ TEST(Clock, SleepNanoseconds) {
}
}
+#endif // OS_WIN
+
} // namespace
} // namespace test
} // namespace crashpad
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698