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

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

Issue 1653183002: getObject now supports specifying offset,count for strings. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/service.md » ('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 4248 matching lines...) Expand 10 before | Expand all | Expand 10 after
4259 str.PrintJSON(&js, true); 4259 str.PrintJSON(&js, true);
4260 ElideJSONSubstring("classes", js.ToCString(), buffer); 4260 ElideJSONSubstring("classes", js.ToCString(), buffer);
4261 ElideJSONSubstring("objects", buffer, buffer); 4261 ElideJSONSubstring("objects", buffer, buffer);
4262 ElideJSONSubstring("_OneByteString@", buffer, buffer); 4262 ElideJSONSubstring("_OneByteString@", buffer, buffer);
4263 EXPECT_STREQ( 4263 EXPECT_STREQ(
4264 "{\"type\":\"@Instance\"," 4264 "{\"type\":\"@Instance\","
4265 "\"_vmType\":\"String\"," 4265 "\"_vmType\":\"String\","
4266 "\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\"," 4266 "\"class\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
4267 "\"name\":\"_OneByteString\",\"_vmName\":\"\"}," 4267 "\"name\":\"_OneByteString\",\"_vmName\":\"\"},"
4268 "\"kind\":\"String\"," 4268 "\"kind\":\"String\","
4269 "\"id\":\"\",\"valueAsString\":\"dw\"}", 4269 "\"id\":\"\",\"length\":2,\"valueAsString\":\"dw\"}",
4270 buffer); 4270 buffer);
4271 } 4271 }
4272 // Array reference 4272 // Array reference
4273 { 4273 {
4274 JSONStream js; 4274 JSONStream js;
4275 const Array& array = Array::Handle(Array::New(0)); 4275 const Array& array = Array::Handle(Array::New(0));
4276 array.PrintJSON(&js, true); 4276 array.PrintJSON(&js, true);
4277 ElideJSONSubstring("classes", js.ToCString(), buffer); 4277 ElideJSONSubstring("classes", js.ToCString(), buffer);
4278 ElideJSONSubstring("objects", buffer, buffer); 4278 ElideJSONSubstring("objects", buffer, buffer);
4279 ElideJSONSubstring("_List@", buffer, buffer); 4279 ElideJSONSubstring("_List@", buffer, buffer);
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
4678 String& test = String::Handle(); 4678 String& test = String::Handle();
4679 String& result = String::Handle(); 4679 String& result = String::Handle();
4680 for (size_t i = 0; i < ARRAY_SIZE(tests); i++) { 4680 for (size_t i = 0; i < ARRAY_SIZE(tests); i++) {
4681 test = String::New(tests[i].in); 4681 test = String::New(tests[i].in);
4682 result = String::IdentifierPrettyName(test); 4682 result = String::IdentifierPrettyName(test);
4683 EXPECT_STREQ(tests[i].out, result.ToCString()); 4683 EXPECT_STREQ(tests[i].out, result.ToCString());
4684 } 4684 }
4685 } 4685 }
4686 4686
4687 } // namespace dart 4687 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/service/service.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698