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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 interface_name = Symbols::New("Norton"); | 110 interface_name = Symbols::New("Norton"); |
111 interface = Class::New(interface_name, script, Scanner::kDummyTokenIndex); | 111 interface = Class::New(interface_name, script, Scanner::kDummyTokenIndex); |
112 interfaces.SetAt(1, Type::Handle(Type::NewNonParameterizedType(interface))); | 112 interfaces.SetAt(1, Type::Handle(Type::NewNonParameterizedType(interface))); |
113 cls.set_interfaces(interfaces); | 113 cls.set_interfaces(interfaces); |
114 cls.Finalize(); | 114 cls.Finalize(); |
115 } | 115 } |
116 | 116 |
117 | 117 |
118 TEST_CASE(TypeArguments) { | 118 TEST_CASE(TypeArguments) { |
119 const Type& type1 = Type::Handle(Type::Double()); | 119 const Type& type1 = Type::Handle(Type::Double()); |
120 const Type& type2 = Type::Handle(Type::StringInterface()); | 120 const Type& type2 = Type::Handle(Type::StringType()); |
121 const TypeArguments& type_arguments1 = TypeArguments::Handle( | 121 const TypeArguments& type_arguments1 = TypeArguments::Handle( |
122 TypeArguments::New(2)); | 122 TypeArguments::New(2)); |
123 type_arguments1.SetTypeAt(0, type1); | 123 type_arguments1.SetTypeAt(0, type1); |
124 type_arguments1.SetTypeAt(1, type2); | 124 type_arguments1.SetTypeAt(1, type2); |
125 const TypeArguments& type_arguments2 = TypeArguments::Handle( | 125 const TypeArguments& type_arguments2 = TypeArguments::Handle( |
126 TypeArguments::New(2)); | 126 TypeArguments::New(2)); |
127 type_arguments2.SetTypeAt(0, type1); | 127 type_arguments2.SetTypeAt(0, type1); |
128 type_arguments2.SetTypeAt(1, type2); | 128 type_arguments2.SetTypeAt(1, type2); |
129 EXPECT_NE(type_arguments1.raw(), type_arguments2.raw()); | 129 EXPECT_NE(type_arguments1.raw(), type_arguments2.raw()); |
130 OS::Print("1: %s\n", type_arguments1.ToCString()); | 130 OS::Print("1: %s\n", type_arguments1.ToCString()); |
(...skipping 3112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3243 isolate->heap()->CollectAllGarbage(); | 3243 isolate->heap()->CollectAllGarbage(); |
3244 EXPECT(weak1.key() == Object::null()); | 3244 EXPECT(weak1.key() == Object::null()); |
3245 EXPECT(weak1.value() == Object::null()); | 3245 EXPECT(weak1.value() == Object::null()); |
3246 EXPECT(weak2.key() == Object::null()); | 3246 EXPECT(weak2.key() == Object::null()); |
3247 EXPECT(weak2.value() == Object::null()); | 3247 EXPECT(weak2.value() == Object::null()); |
3248 } | 3248 } |
3249 | 3249 |
3250 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 3250 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
3251 | 3251 |
3252 } // namespace dart | 3252 } // namespace dart |
OLD | NEW |