| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 interfaces.SetAt(0, Type::Handle(Type::NewNonParameterizedType(interface))); | 107 interfaces.SetAt(0, Type::Handle(Type::NewNonParameterizedType(interface))); |
| 108 interface_name = Symbols::New("Norton"); | 108 interface_name = Symbols::New("Norton"); |
| 109 interface = Class::New(interface_name, script, Scanner::kDummyTokenIndex); | 109 interface = Class::New(interface_name, script, Scanner::kDummyTokenIndex); |
| 110 interfaces.SetAt(1, Type::Handle(Type::NewNonParameterizedType(interface))); | 110 interfaces.SetAt(1, Type::Handle(Type::NewNonParameterizedType(interface))); |
| 111 cls.set_interfaces(interfaces); | 111 cls.set_interfaces(interfaces); |
| 112 cls.Finalize(); | 112 cls.Finalize(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 | 115 |
| 116 TEST_CASE(TypeArguments) { | 116 TEST_CASE(TypeArguments) { |
| 117 const Type& type1 = Type::Handle(Type::DoubleInterface()); | 117 const Type& type1 = Type::Handle(Type::Double()); |
| 118 const Type& type2 = Type::Handle(Type::StringInterface()); | 118 const Type& type2 = Type::Handle(Type::StringInterface()); |
| 119 const TypeArguments& type_arguments1 = TypeArguments::Handle( | 119 const TypeArguments& type_arguments1 = TypeArguments::Handle( |
| 120 TypeArguments::New(2)); | 120 TypeArguments::New(2)); |
| 121 type_arguments1.SetTypeAt(0, type1); | 121 type_arguments1.SetTypeAt(0, type1); |
| 122 type_arguments1.SetTypeAt(1, type2); | 122 type_arguments1.SetTypeAt(1, type2); |
| 123 const TypeArguments& type_arguments2 = TypeArguments::Handle( | 123 const TypeArguments& type_arguments2 = TypeArguments::Handle( |
| 124 TypeArguments::New(2)); | 124 TypeArguments::New(2)); |
| 125 type_arguments2.SetTypeAt(0, type1); | 125 type_arguments2.SetTypeAt(0, type1); |
| 126 type_arguments2.SetTypeAt(1, type2); | 126 type_arguments2.SetTypeAt(1, type2); |
| 127 EXPECT_NE(type_arguments1.raw(), type_arguments2.raw()); | 127 EXPECT_NE(type_arguments1.raw(), type_arguments2.raw()); |
| (...skipping 2976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3104 isolate->heap()->CollectAllGarbage(); | 3104 isolate->heap()->CollectAllGarbage(); |
| 3105 EXPECT(weak1.key() == Object::null()); | 3105 EXPECT(weak1.key() == Object::null()); |
| 3106 EXPECT(weak1.value() == Object::null()); | 3106 EXPECT(weak1.value() == Object::null()); |
| 3107 EXPECT(weak2.key() == Object::null()); | 3107 EXPECT(weak2.key() == Object::null()); |
| 3108 EXPECT(weak2.value() == Object::null()); | 3108 EXPECT(weak2.value() == Object::null()); |
| 3109 } | 3109 } |
| 3110 | 3110 |
| 3111 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 3111 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
| 3112 | 3112 |
| 3113 } // namespace dart | 3113 } // namespace dart |
| OLD | NEW |