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

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

Issue 1160873002: Sundry service protocol cleanups before version 1.0. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: pre commit Created 5 years, 6 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/service.cc » ('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 #include "platform/globals.h" 5 #include "platform/globals.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 4313 matching lines...) Expand 10 before | Expand all | Expand 10 after
4324 const String& func_name = String::Handle(String::New("toString")); 4324 const String& func_name = String::Handle(String::New("toString"));
4325 Function& func = Function::Handle(cls.LookupFunction(func_name)); 4325 Function& func = Function::Handle(cls.LookupFunction(func_name));
4326 ASSERT(!func.IsNull()); 4326 ASSERT(!func.IsNull());
4327 func.PrintJSON(&js, true); 4327 func.PrintJSON(&js, true);
4328 elideSubstring("classes", js.ToCString(), buffer); 4328 elideSubstring("classes", js.ToCString(), buffer);
4329 EXPECT_STREQ( 4329 EXPECT_STREQ(
4330 "{\"type\":\"@Function\",\"fixedId\":true," 4330 "{\"type\":\"@Function\",\"fixedId\":true,"
4331 "\"id\":\"\",\"name\":\"toString\"," 4331 "\"id\":\"\",\"name\":\"toString\","
4332 "\"owner\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\"," 4332 "\"owner\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
4333 "\"name\":\"bool\"}," 4333 "\"name\":\"bool\"},"
4334 "\"kind\":\"RegularFunction\"}", 4334 "\"_kind\":\"RegularFunction\","
4335 "\"static\":false,\"const\":false}",
4335 buffer); 4336 buffer);
4336 } 4337 }
4337 // Library reference 4338 // Library reference
4338 { 4339 {
4339 JSONStream js; 4340 JSONStream js;
4340 Library& lib = Library::Handle(isolate->object_store()->core_library()); 4341 Library& lib = Library::Handle(isolate->object_store()->core_library());
4341 lib.PrintJSON(&js, true); 4342 lib.PrintJSON(&js, true);
4342 elideSubstring("libraries", js.ToCString(), buffer); 4343 elideSubstring("libraries", js.ToCString(), buffer);
4343 EXPECT_STREQ( 4344 EXPECT_STREQ(
4344 "{\"type\":\"@Library\",\"fixedId\":true,\"id\":\"\"," 4345 "{\"type\":\"@Library\",\"fixedId\":true,\"id\":\"\","
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
4601 EXPECT_VALID(h_result); 4602 EXPECT_VALID(h_result);
4602 Integer& result = Integer::Handle(); 4603 Integer& result = Integer::Handle();
4603 result ^= Api::UnwrapHandle(h_result); 4604 result ^= Api::UnwrapHandle(h_result);
4604 String& foo = String::Handle(String::New("foo")); 4605 String& foo = String::Handle(String::New("foo"));
4605 Integer& expected = Integer::Handle(); 4606 Integer& expected = Integer::Handle();
4606 expected ^= foo.HashCode(); 4607 expected ^= foo.HashCode();
4607 EXPECT(result.IsIdenticalTo(expected)); 4608 EXPECT(result.IsIdenticalTo(expected));
4608 } 4609 }
4609 4610
4610 } // namespace dart 4611 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698