OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // TODO(zra): Remove when tests are ready to enable. | 5 // TODO(zra): Remove when tests are ready to enable. |
6 #include "platform/globals.h" | 6 #include "platform/globals.h" |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/bigint_operations.h" | 9 #include "vm/bigint_operations.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 3996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4007 return; | 4007 return; |
4008 } | 4008 } |
4009 Object& handle = Object::Handle(obj); | 4009 Object& handle = Object::Handle(obj); |
4010 // Skip some common simple objects to run in reasonable time. | 4010 // Skip some common simple objects to run in reasonable time. |
4011 if (handle.IsString() || | 4011 if (handle.IsString() || |
4012 handle.IsArray() || | 4012 handle.IsArray() || |
4013 handle.IsLiteralToken()) { | 4013 handle.IsLiteralToken()) { |
4014 return; | 4014 return; |
4015 } | 4015 } |
4016 JSONStream js; | 4016 JSONStream js; |
4017 handle.PrintToJSONStream(&js, false); | 4017 handle.PrintJSON(&js, false); |
4018 EXPECT_SUBSTRING("\"type\":", js.ToCString()); | 4018 EXPECT_SUBSTRING("\"type\":", js.ToCString()); |
4019 } | 4019 } |
4020 }; | 4020 }; |
4021 | 4021 |
4022 | 4022 |
4023 TEST_CASE(PrintToJSONStream) { | 4023 TEST_CASE(PrintJSON) { |
4024 Heap* heap = Isolate::Current()->heap(); | 4024 Heap* heap = Isolate::Current()->heap(); |
4025 heap->CollectAllGarbage(); | 4025 heap->CollectAllGarbage(); |
4026 JSONTypeVerifier verifier; | 4026 JSONTypeVerifier verifier; |
4027 heap->IterateObjects(&verifier); | 4027 heap->IterateObjects(&verifier); |
4028 } | 4028 } |
4029 | 4029 |
4030 #endif // !defined(TARGET_ARCH_ARM64) | 4030 #endif // !defined(TARGET_ARCH_ARM64) |
4031 | 4031 |
4032 } // namespace dart | 4032 } // namespace dart |
OLD | NEW |