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

Side by Side Diff: vm/class_finalizer_test.cc

Issue 10827249: - Register canonical names for internal VM classes and get rid of the method GetSingletonClassName (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 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 | « no previous file | vm/code_descriptors.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/assert.h" 5 #include "platform/assert.h"
6 #include "vm/class_finalizer.h" 6 #include "vm/class_finalizer.h"
7 #include "vm/symbols.h" 7 #include "vm/symbols.h"
8 #include "vm/unit_test.h" 8 #include "vm/unit_test.h"
9 9
10 namespace dart { 10 namespace dart {
11 11
12 12
13 static RawClass* CreateTestClass(const char* name) { 13 static RawClass* CreateTestClass(const char* name) {
14 const Array& empty_array = Array::Handle(Array::Empty()); 14 const Array& empty_array = Array::Handle(Object::empty_array());
15 const String& class_name = String::Handle(Symbols::New(name)); 15 const String& class_name = String::Handle(Symbols::New(name));
16 const Script& script = Script::Handle(); 16 const Script& script = Script::Handle();
17 const Class& cls = 17 const Class& cls =
18 Class::Handle(Class::New(class_name, script, Scanner::kDummyTokenIndex)); 18 Class::Handle(Class::New(class_name, script, Scanner::kDummyTokenIndex));
19 cls.set_interfaces(empty_array); 19 cls.set_interfaces(empty_array);
20 cls.SetFunctions(empty_array); 20 cls.SetFunctions(empty_array);
21 cls.SetFields(empty_array); 21 cls.SetFields(empty_array);
22 return cls.raw(); 22 return cls.raw();
23 } 23 }
24 24
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 Scanner::kDummyTokenIndex)); 96 Scanner::kDummyTokenIndex));
97 const TypeArguments& type_arguments = TypeArguments::Handle(); 97 const TypeArguments& type_arguments = TypeArguments::Handle();
98 rhb.set_super_type(Type::Handle( 98 rhb.set_super_type(Type::Handle(
99 Type::New(Object::Handle(unresolved.raw()), 99 Type::New(Object::Handle(unresolved.raw()),
100 type_arguments, 100 type_arguments,
101 Scanner::kDummyTokenIndex))); 101 Scanner::kDummyTokenIndex)));
102 EXPECT(ClassFinalizer::FinalizePendingClasses()); 102 EXPECT(ClassFinalizer::FinalizePendingClasses());
103 } 103 }
104 104
105 } // namespace dart 105 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | vm/code_descriptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698