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 "vm/assembler.h" | 5 #include "vm/assembler.h" |
6 #include "vm/bigint_operations.h" | 6 #include "vm/bigint_operations.h" |
7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
(...skipping 3500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3511 " }\n" | 3511 " }\n" |
3512 " static void test5(b) {\n" | 3512 " static void test5(b) {\n" |
3513 " return b > 1 ?\n" | 3513 " return b > 1 ?\n" |
3514 " b - 2 : b;\n" | 3514 " b - 2 : b;\n" |
3515 " }\n" | 3515 " }\n" |
3516 " void test6(int a) {\n" | 3516 " void test6(int a) {\n" |
3517 " return a > 1 ? a + 1 : a;\n" | 3517 " return a > 1 ? a + 1 : a;\n" |
3518 " }\n" | 3518 " }\n" |
3519 "}"; | 3519 "}"; |
3520 TestCase::LoadTestScript(kScriptChars, NULL); | 3520 TestCase::LoadTestScript(kScriptChars, NULL); |
3521 EXPECT(ClassFinalizer::FinalizePendingClasses()); | 3521 EXPECT(ClassFinalizer::FinalizeTypeHierarchy()); |
3522 const String& name = String::Handle(String::New(TestCase::url())); | 3522 const String& name = String::Handle(String::New(TestCase::url())); |
3523 const Library& lib = Library::Handle(Library::LookupLibrary(name)); | 3523 const Library& lib = Library::Handle(Library::LookupLibrary(name)); |
3524 EXPECT(!lib.IsNull()); | 3524 EXPECT(!lib.IsNull()); |
3525 | 3525 |
3526 const Class& class_a = Class::Handle( | 3526 const Class& class_a = Class::Handle( |
3527 lib.LookupClass(String::Handle(Symbols::New("A")))); | 3527 lib.LookupClass(String::Handle(Symbols::New("A")))); |
3528 const Class& class_b = Class::Handle( | 3528 const Class& class_b = Class::Handle( |
3529 lib.LookupClass(String::Handle(Symbols::New("B")))); | 3529 lib.LookupClass(String::Handle(Symbols::New("B")))); |
3530 const Function& a_test1 = | 3530 const Function& a_test1 = |
3531 Function::Handle(GetStaticFunction(class_a, "test1")); | 3531 Function::Handle(GetStaticFunction(class_a, "test1")); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3619 cls = Object::dynamic_class(); | 3619 cls = Object::dynamic_class(); |
3620 array = cls.fields(); | 3620 array = cls.fields(); |
3621 EXPECT(!array.IsNull()); | 3621 EXPECT(!array.IsNull()); |
3622 EXPECT(array.IsArray()); | 3622 EXPECT(array.IsArray()); |
3623 array = cls.functions(); | 3623 array = cls.functions(); |
3624 EXPECT(!array.IsNull()); | 3624 EXPECT(!array.IsNull()); |
3625 EXPECT(array.IsArray()); | 3625 EXPECT(array.IsArray()); |
3626 } | 3626 } |
3627 | 3627 |
3628 } // namespace dart | 3628 } // namespace dart |
OLD | NEW |