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/assembler.h" | 6 #include "vm/assembler.h" |
7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
9 #include "vm/object.h" | 9 #include "vm/object.h" |
10 #include "vm/object_store.h" | 10 #include "vm/object_store.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 | 69 |
70 // Setup the functions in the class. | 70 // Setup the functions in the class. |
71 cls.SetFunctions(functions); | 71 cls.SetFunctions(functions); |
72 | 72 |
73 function_name = String::New("Foo"); | 73 function_name = String::New("Foo"); |
74 function = cls.LookupDynamicFunction(function_name); | 74 function = cls.LookupDynamicFunction(function_name); |
75 EXPECT(function.IsNull()); | 75 EXPECT(function.IsNull()); |
76 function = cls.LookupStaticFunction(function_name); | 76 function = cls.LookupStaticFunction(function_name); |
77 EXPECT(!function.IsNull()); | 77 EXPECT(!function.IsNull()); |
78 EXPECT(function_name.Equals(String::Handle(function.name()))); | 78 EXPECT(function_name.Equals(String::Handle(function.name()))); |
79 EXPECT_EQ(cls.raw(), function.owner()); | 79 EXPECT_EQ(cls.raw(), function.Owner()); |
80 EXPECT(function.is_static()); | 80 EXPECT(function.is_static()); |
81 function_name = String::New("baz"); | 81 function_name = String::New("baz"); |
82 function = cls.LookupDynamicFunction(function_name); | 82 function = cls.LookupDynamicFunction(function_name); |
83 EXPECT(!function.IsNull()); | 83 EXPECT(!function.IsNull()); |
84 EXPECT(function_name.Equals(String::Handle(function.name()))); | 84 EXPECT(function_name.Equals(String::Handle(function.name()))); |
85 EXPECT_EQ(cls.raw(), function.owner()); | 85 EXPECT_EQ(cls.raw(), function.Owner()); |
86 EXPECT(!function.is_static()); | 86 EXPECT(!function.is_static()); |
87 function = cls.LookupStaticFunction(function_name); | 87 function = cls.LookupStaticFunction(function_name); |
88 EXPECT(function.IsNull()); | 88 EXPECT(function.IsNull()); |
89 | 89 |
90 function_name = String::New("foo"); | 90 function_name = String::New("foo"); |
91 function = cls.LookupDynamicFunction(function_name); | 91 function = cls.LookupDynamicFunction(function_name); |
92 EXPECT(!function.IsNull()); | 92 EXPECT(!function.IsNull()); |
93 EXPECT_EQ(0, function.num_fixed_parameters()); | 93 EXPECT_EQ(0, function.num_fixed_parameters()); |
94 EXPECT_EQ(0, function.num_optional_parameters()); | 94 EXPECT_EQ(0, function.num_optional_parameters()); |
95 | 95 |
(...skipping 2762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2858 "#6 MyClass.foo (dart:test-lib:32:14)\n" | 2858 "#6 MyClass.foo (dart:test-lib:32:14)\n" |
2859 "#7 MyClass.MyClass.<anonymous closure> (dart:test-lib:21:15)\n" | 2859 "#7 MyClass.MyClass.<anonymous closure> (dart:test-lib:21:15)\n" |
2860 "#8 MyClass.MyClass (dart:test-lib:21:18)\n" | 2860 "#8 MyClass.MyClass (dart:test-lib:21:18)\n" |
2861 "#9 main.<anonymous closure> (dart:test-lib:37:10)\n" | 2861 "#9 main.<anonymous closure> (dart:test-lib:37:10)\n" |
2862 "#10 main (dart:test-lib:37:24)"); | 2862 "#10 main (dart:test-lib:37:24)"); |
2863 } | 2863 } |
2864 | 2864 |
2865 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 2865 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
2866 | 2866 |
2867 } // namespace dart | 2867 } // namespace dart |
OLD | NEW |