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

Side by Side Diff: base/location_unittest.cc

Issue 2415673005: Revert of Move GetProgramCounter in FROM_HERE to a common function (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « base/location.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/location.h"
6
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 namespace tracked_objects {
10
11 #if defined(COMPILER_MSVC) || (defined(COMPILER_GCC) && !defined(OS_NACL))
12 TEST(LocationTest, TestProgramCounter) {
13 Location loc1 = FROM_HERE;
14 const void* pc1 = GetProgramCounter();
15 const void* pc2 = GetProgramCounter();
16 Location loc2 = FROM_HERE;
17
18 EXPECT_LT(loc1.program_counter(), pc1);
19 EXPECT_LT(pc1, pc2);
20 EXPECT_LT(pc2, loc2.program_counter());
21 }
22 #endif // defined(COMPILER_MSVC) || (defined(COMPILER_GCC) && !defined(OS_NACL))
23
24 } // namespace base
OLDNEW
« no previous file with comments | « base/location.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698