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

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

Issue 1153193006: Standardize on using "kind" to distinguish sub-varieties of a type. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: doc changes 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 4510 matching lines...) Expand 10 before | Expand all | Expand 10 after
4521 "{\"type\":\"@null\",\"fixedId\":true," 4521 "{\"type\":\"@null\",\"fixedId\":true,"
4522 "\"id\":\"objects\\/null\"," 4522 "\"id\":\"objects\\/null\","
4523 "\"valueAsString\":\"null\"}", 4523 "\"valueAsString\":\"null\"}",
4524 js.ToCString()); 4524 js.ToCString());
4525 } 4525 }
4526 // Sentinel reference 4526 // Sentinel reference
4527 { 4527 {
4528 JSONStream js; 4528 JSONStream js;
4529 Object::sentinel().PrintJSON(&js, true); 4529 Object::sentinel().PrintJSON(&js, true);
4530 EXPECT_STREQ( 4530 EXPECT_STREQ(
4531 "{\"type\":\"Sentinel\",\"fixedId\":true," 4531 "{\"type\":\"Sentinel\","
4532 "\"id\":\"objects\\/not-initialized\"," 4532 "\"kind\":\"NotInitialized\","
4533 "\"valueAsString\":\"<not initialized>\"}", 4533 "\"valueAsString\":\"<not initialized>\"}",
4534 js.ToCString()); 4534 js.ToCString());
4535 } 4535 }
4536 // Transition sentinel reference 4536 // Transition sentinel reference
4537 { 4537 {
4538 JSONStream js; 4538 JSONStream js;
4539 Object::transition_sentinel().PrintJSON(&js, true); 4539 Object::transition_sentinel().PrintJSON(&js, true);
4540 EXPECT_STREQ( 4540 EXPECT_STREQ(
4541 "{\"type\":\"Sentinel\",\"fixedId\":true," 4541 "{\"type\":\"Sentinel\","
4542 "\"id\":\"objects\\/being-initialized\"," 4542 "\"kind\":\"BeingInitialized\","
4543 "\"valueAsString\":\"<being initialized>\"}", 4543 "\"valueAsString\":\"<being initialized>\"}",
4544 js.ToCString()); 4544 js.ToCString());
4545 } 4545 }
4546 // LiteralToken reference. This is meant to be an example of a 4546 // LiteralToken reference. This is meant to be an example of a
4547 // "weird" type that isn't usually returned by the VM Service except 4547 // "weird" type that isn't usually returned by the VM Service except
4548 // when we are doing direct heap inspection. 4548 // when we are doing direct heap inspection.
4549 { 4549 {
4550 JSONStream js; 4550 JSONStream js;
4551 LiteralToken& tok = LiteralToken::Handle(LiteralToken::New()); 4551 LiteralToken& tok = LiteralToken::Handle(LiteralToken::New());
4552 tok.PrintJSON(&js, true); 4552 tok.PrintJSON(&js, true);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
4670 // 2. Create an empty internalized LinkedHashMap in C++. 4670 // 2. Create an empty internalized LinkedHashMap in C++.
4671 Instance& dart_map = Instance::Handle(); 4671 Instance& dart_map = Instance::Handle();
4672 dart_map ^= Api::UnwrapHandle(h_result); 4672 dart_map ^= Api::UnwrapHandle(h_result);
4673 LinkedHashMap& cc_map = LinkedHashMap::Handle(LinkedHashMap::NewDefault()); 4673 LinkedHashMap& cc_map = LinkedHashMap::Handle(LinkedHashMap::NewDefault());
4674 4674
4675 // 3. Expect them to have identical structure. 4675 // 3. Expect them to have identical structure.
4676 CheckIdenticalHashStructure(dart_map, cc_map); 4676 CheckIdenticalHashStructure(dart_map, cc_map);
4677 } 4677 }
4678 4678
4679 } // namespace dart 4679 } // 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