OLD | NEW |
| (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 | |
OLD | NEW |