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

Side by Side Diff: base/time/time_win_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
« no previous file with comments | « base/time/time_unittest.cc ('k') | base/timer/hi_res_timer_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <windows.h> 5 #include <windows.h>
6 #include <mmsystem.h> 6 #include <mmsystem.h>
7 #include <process.h> 7 #include <process.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/threading/platform_thread.h" 13 #include "base/threading/platform_thread.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "base/win/registry.h" 15 #include "base/win/registry.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/googletest/include/gtest/gtest.h"
17 17
18 namespace base { 18 namespace base {
19 namespace { 19 namespace {
20 20
21 class MockTimeTicks : public TimeTicks { 21 class MockTimeTicks : public TimeTicks {
22 public: 22 public:
23 static DWORD Ticker() { 23 static DWORD Ticker() {
24 return static_cast<int>(InterlockedIncrement(&ticker_)); 24 return static_cast<int>(InterlockedIncrement(&ticker_));
25 } 25 }
26 26
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 static_cast<double>((converted_value - TimeTicks()).InMicroseconds()); 287 static_cast<double>((converted_value - TimeTicks()).InMicroseconds());
288 EXPECT_NEAR(expected_microseconds_since_origin, 288 EXPECT_NEAR(expected_microseconds_since_origin,
289 converted_microseconds_since_origin, 289 converted_microseconds_since_origin,
290 1.0) 290 1.0)
291 << "ticks=" << ticks << ", to be converted via logic path: " 291 << "ticks=" << ticks << ", to be converted via logic path: "
292 << (ticks < Time::kQPCOverflowThreshold ? "FAST" : "SAFE"); 292 << (ticks < Time::kQPCOverflowThreshold ? "FAST" : "SAFE");
293 } 293 }
294 } 294 }
295 295
296 } // namespace base 296 } // namespace base
OLDNEW
« no previous file with comments | « base/time/time_unittest.cc ('k') | base/timer/hi_res_timer_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698