| 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/cha.h" | 6 #include "vm/cha.h" |
| 7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 #include "vm/symbols.h" | 9 #include "vm/symbols.h" |
| 10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 "}\n" | 21 "}\n" |
| 22 "class C extends B {" | 22 "class C extends B {" |
| 23 " foo() { }" | 23 " foo() { }" |
| 24 "}\n" | 24 "}\n" |
| 25 "class D extends A {" | 25 "class D extends A {" |
| 26 " foo() { }" | 26 " foo() { }" |
| 27 " bar() { }" | 27 " bar() { }" |
| 28 "}\n"; | 28 "}\n"; |
| 29 | 29 |
| 30 TestCase::LoadTestScript(kScriptChars, NULL); | 30 TestCase::LoadTestScript(kScriptChars, NULL); |
| 31 EXPECT(ClassFinalizer::FinalizePendingClasses()); | 31 EXPECT(ClassFinalizer::FinalizePendingClassInterfaces()); |
| 32 const String& name = String::Handle(String::New(TestCase::url())); | 32 const String& name = String::Handle(String::New(TestCase::url())); |
| 33 const Library& lib = Library::Handle(Library::LookupLibrary(name)); | 33 const Library& lib = Library::Handle(Library::LookupLibrary(name)); |
| 34 EXPECT(!lib.IsNull()); | 34 EXPECT(!lib.IsNull()); |
| 35 | 35 |
| 36 const Class& class_a = Class::Handle( | 36 const Class& class_a = Class::Handle( |
| 37 lib.LookupClass(String::Handle(Symbols::New("A")))); | 37 lib.LookupClass(String::Handle(Symbols::New("A")))); |
| 38 EXPECT(!class_a.IsNull()); | 38 EXPECT(!class_a.IsNull()); |
| 39 const intptr_t class_a_id = class_a.id(); | 39 const intptr_t class_a_id = class_a.id(); |
| 40 | 40 |
| 41 const Class& class_b = Class::Handle( | 41 const Class& class_b = Class::Handle( |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 EXPECT(!CHA::HasSubclasses(kNullCid)); | 120 EXPECT(!CHA::HasSubclasses(kNullCid)); |
| 121 EXPECT(!CHA::HasSubclasses(kDynamicCid)); | 121 EXPECT(!CHA::HasSubclasses(kDynamicCid)); |
| 122 EXPECT(!CHA::HasSubclasses(kVoidCid)); | 122 EXPECT(!CHA::HasSubclasses(kVoidCid)); |
| 123 EXPECT(CHA::HasSubclasses(class_a_id)); | 123 EXPECT(CHA::HasSubclasses(class_a_id)); |
| 124 EXPECT(CHA::HasSubclasses(class_b_id)); | 124 EXPECT(CHA::HasSubclasses(class_b_id)); |
| 125 EXPECT(!CHA::HasSubclasses(class_c_id)); | 125 EXPECT(!CHA::HasSubclasses(class_c_id)); |
| 126 EXPECT(!CHA::HasSubclasses(class_d_id)); | 126 EXPECT(!CHA::HasSubclasses(class_d_id)); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace dart | 129 } // namespace dart |
| OLD | NEW |