OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "include/dart_api.h" | 5 #include "include/dart_api.h" |
6 | 6 |
7 #include "vm/assert.h" | 7 #include "vm/assert.h" |
8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/dart_api_impl.h" | 10 #include "vm/dart_api_impl.h" |
11 #include "vm/dart_entry.h" | 11 #include "vm/dart_entry.h" |
12 #include "vm/resolver.h" | 12 #include "vm/resolver.h" |
13 #include "vm/stack_frame.h" | 13 #include "vm/stack_frame.h" |
14 #include "vm/unit_test.h" | 14 #include "vm/unit_test.h" |
15 #include "vm/verifier.h" | 15 #include "vm/verifier.h" |
16 #include "vm/zone.h" | 16 #include "vm/zone.h" |
17 | 17 |
18 namespace dart { | 18 namespace dart { |
19 | 19 |
20 #if defined(TARGET_ARCH_IA32) // only ia32 can run stack frame iteration tests. | 20 // Only ia32 and x64 can run stack frame iteration tests. |
| 21 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) |
21 // Unit test for empty stack frame iteration. | 22 // Unit test for empty stack frame iteration. |
22 TEST_CASE(EmptyStackFrameIteration) { | 23 TEST_CASE(EmptyStackFrameIteration) { |
23 StackFrameIterator iterator(StackFrameIterator::kValidateFrames); | 24 StackFrameIterator iterator(StackFrameIterator::kValidateFrames); |
24 EXPECT(!iterator.HasNextFrame()); | 25 EXPECT(!iterator.HasNextFrame()); |
25 EXPECT(iterator.NextFrame() == NULL); | 26 EXPECT(iterator.NextFrame() == NULL); |
26 VerifyPointersVisitor::VerifyPointers(); | 27 VerifyPointersVisitor::VerifyPointers(); |
27 } | 28 } |
28 | 29 |
29 | 30 |
30 // Unit test for empty dart stack frame iteration. | 31 // Unit test for empty dart stack frame iteration. |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 "}"; | 292 "}"; |
292 Dart_Handle lib = TestCase::LoadTestScript( | 293 Dart_Handle lib = TestCase::LoadTestScript( |
293 kScriptChars, | 294 kScriptChars, |
294 reinterpret_cast<Dart_NativeEntryResolver>(native_lookup)); | 295 reinterpret_cast<Dart_NativeEntryResolver>(native_lookup)); |
295 Dart_InvokeStatic(lib, | 296 Dart_InvokeStatic(lib, |
296 Dart_NewString("StackFrame2Test"), | 297 Dart_NewString("StackFrame2Test"), |
297 Dart_NewString("testMain"), | 298 Dart_NewString("testMain"), |
298 0, | 299 0, |
299 NULL); | 300 NULL); |
300 } | 301 } |
301 #endif // TARGET_ARCH_IA32. | 302 #endif // TARGET_ARCH_IA32 || TARGET_ARCH_X64. |
302 | 303 |
303 } // namespace dart | 304 } // namespace dart |
OLD | NEW |