mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-19 18:03:47 +00:00
win: Disable Clock tests that require SleepNanoseconds
As it was left unimplemented on Windows per previous discussion. R=mark@chromium.org BUG=crashpad:1 Review URL: https://codereview.chromium.org/838833004
This commit is contained in:
parent
b0545c2627
commit
b1d2beb724
@ -41,14 +41,18 @@ TEST(Clock, ClockMonotonicNanoseconds) {
|
|||||||
EXPECT_GE(now, last);
|
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
|
// SleepNanoseconds() should sleep for at least the value of the clock’s
|
||||||
// resolution, so the clock’s value should definitely increase after a sleep.
|
// resolution, so the clock’s value should definitely increase after a sleep.
|
||||||
// EXPECT_GT can be used instead of EXPECT_GE after the sleep.
|
// EXPECT_GT can be used instead of EXPECT_GE after the sleep.
|
||||||
SleepNanoseconds(1);
|
SleepNanoseconds(1);
|
||||||
now = ClockMonotonicNanoseconds();
|
now = ClockMonotonicNanoseconds();
|
||||||
EXPECT_GT(now, start);
|
EXPECT_GT(now, start);
|
||||||
|
#endif // OS_WIN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(OS_WIN) // No SleepNanoseconds implemented on Windows.
|
||||||
|
|
||||||
void TestSleepNanoseconds(uint64_t nanoseconds) {
|
void TestSleepNanoseconds(uint64_t nanoseconds) {
|
||||||
uint64_t start = ClockMonotonicNanoseconds();
|
uint64_t start = ClockMonotonicNanoseconds();
|
||||||
|
|
||||||
@ -87,6 +91,8 @@ TEST(Clock, SleepNanoseconds) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // OS_WIN
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
} // namespace test
|
} // namespace test
|
||||||
} // namespace crashpad
|
} // namespace crashpad
|
||||||
|
Loading…
x
Reference in New Issue
Block a user