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

Side by Side Diff: runtime/vm/object_test.cc

Issue 257053003: Always use the same json for null in the vm service. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: gen js Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/profiler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698