| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |