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

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

Issue 1057333004: Continue improving the documentation for the vm service protocol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 5 years, 8 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/service/service.idl » ('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 4192 matching lines...) Expand 10 before | Expand all | Expand 10 after
4203 { 4203 {
4204 JSONStream js; 4204 JSONStream js;
4205 Class& cls = Class::Handle(isolate->object_store()->bool_class()); 4205 Class& cls = Class::Handle(isolate->object_store()->bool_class());
4206 const String& func_name = String::Handle(String::New("toString")); 4206 const String& func_name = String::Handle(String::New("toString"));
4207 Function& func = Function::Handle(cls.LookupFunction(func_name)); 4207 Function& func = Function::Handle(cls.LookupFunction(func_name));
4208 ASSERT(!func.IsNull()); 4208 ASSERT(!func.IsNull());
4209 func.PrintJSON(&js, true); 4209 func.PrintJSON(&js, true);
4210 elideSubstring("classes", js.ToCString(), buffer); 4210 elideSubstring("classes", js.ToCString(), buffer);
4211 EXPECT_STREQ( 4211 EXPECT_STREQ(
4212 "{\"type\":\"@Function\",\"id\":\"\",\"name\":\"toString\"," 4212 "{\"type\":\"@Function\",\"id\":\"\",\"name\":\"toString\","
4213 "\"owningClass\":{\"type\":\"@Class\",\"id\":\"\",\"name\":\"bool\"}," 4213 "\"owner\":{\"type\":\"@Class\",\"id\":\"\",\"name\":\"bool\"},"
4214 "\"kind\":\"kRegularFunction\"}", 4214 "\"kind\":\"RegularFunction\"}",
4215 buffer); 4215 buffer);
4216 } 4216 }
4217 // Library reference 4217 // Library reference
4218 { 4218 {
4219 JSONStream js; 4219 JSONStream js;
4220 Library& lib = Library::Handle(isolate->object_store()->core_library()); 4220 Library& lib = Library::Handle(isolate->object_store()->core_library());
4221 lib.PrintJSON(&js, true); 4221 lib.PrintJSON(&js, true);
4222 elideSubstring("libraries", js.ToCString(), buffer); 4222 elideSubstring("libraries", js.ToCString(), buffer);
4223 EXPECT_STREQ( 4223 EXPECT_STREQ(
4224 "{\"type\":\"@Library\",\"id\":\"\",\"name\":\"dart.core\"," 4224 "{\"type\":\"@Library\",\"id\":\"\",\"name\":\"dart.core\","
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
4475 EXPECT_VALID(h_result); 4475 EXPECT_VALID(h_result);
4476 Integer& result = Integer::Handle(); 4476 Integer& result = Integer::Handle();
4477 result ^= Api::UnwrapHandle(h_result); 4477 result ^= Api::UnwrapHandle(h_result);
4478 String& foo = String::Handle(String::New("foo")); 4478 String& foo = String::Handle(String::New("foo"));
4479 Integer& expected = Integer::Handle(); 4479 Integer& expected = Integer::Handle();
4480 expected ^= foo.HashCode(); 4480 expected ^= foo.HashCode();
4481 EXPECT(result.IsIdenticalTo(expected)); 4481 EXPECT(result.IsIdenticalTo(expected));
4482 } 4482 }
4483 4483
4484 } // namespace dart 4484 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/service/service.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698