OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project 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 // Tests the sampling API in include/v8.h | 5 // Tests the sampling API in include/v8.h |
6 | 6 |
7 // TODO(mythria): Remove this define after this flag is turned on globally | |
8 #define V8_IMMINENT_DEPRECATION_WARNINGS | |
9 | |
10 #include <map> | 7 #include <map> |
11 #include <string> | 8 #include <string> |
12 #include "include/v8.h" | 9 #include "include/v8.h" |
13 #include "src/simulator.h" | 10 #include "src/simulator.h" |
14 #include "test/cctest/cctest.h" | 11 #include "test/cctest/cctest.h" |
15 | 12 |
16 namespace { | 13 namespace { |
17 | 14 |
18 class Sample { | 15 class Sample { |
19 public: | 16 public: |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 242 |
246 const SamplingTestHelper::CodeEventEntry* entry; | 243 const SamplingTestHelper::CodeEventEntry* entry; |
247 entry = helper.FindEventEntry(sample.begin()[0]); | 244 entry = helper.FindEventEntry(sample.begin()[0]); |
248 CHECK(entry); | 245 CHECK(entry); |
249 CHECK(std::string::npos != entry->name.find("test_sampler_api_inner")); | 246 CHECK(std::string::npos != entry->name.find("test_sampler_api_inner")); |
250 | 247 |
251 entry = helper.FindEventEntry(sample.begin()[1]); | 248 entry = helper.FindEventEntry(sample.begin()[1]); |
252 CHECK(entry); | 249 CHECK(entry); |
253 CHECK(std::string::npos != entry->name.find("test_sampler_api_outer")); | 250 CHECK(std::string::npos != entry->name.find("test_sampler_api_outer")); |
254 } | 251 } |
OLD | NEW |