| 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/isolate.h" | 10 #include "vm/isolate.h" |
| (...skipping 3353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3364 const Function& test6 = Function::Handle(GetFunction(class_a, "test6")); | 3364 const Function& test6 = Function::Handle(GetFunction(class_a, "test6")); |
| 3365 const Function& test7 = Function::Handle(GetFunction(class_a, "test7")); | 3365 const Function& test7 = Function::Handle(GetFunction(class_a, "test7")); |
| 3366 EXPECT_EQ(test1.SourceFingerprint(), test2.SourceFingerprint()); | 3366 EXPECT_EQ(test1.SourceFingerprint(), test2.SourceFingerprint()); |
| 3367 EXPECT_NE(test1.SourceFingerprint(), test3.SourceFingerprint()); | 3367 EXPECT_NE(test1.SourceFingerprint(), test3.SourceFingerprint()); |
| 3368 EXPECT_NE(test3.SourceFingerprint(), test4.SourceFingerprint()); | 3368 EXPECT_NE(test3.SourceFingerprint(), test4.SourceFingerprint()); |
| 3369 EXPECT_NE(test4.SourceFingerprint(), test5.SourceFingerprint()); | 3369 EXPECT_NE(test4.SourceFingerprint(), test5.SourceFingerprint()); |
| 3370 EXPECT_NE(test5.SourceFingerprint(), test6.SourceFingerprint()); | 3370 EXPECT_NE(test5.SourceFingerprint(), test6.SourceFingerprint()); |
| 3371 EXPECT_EQ(test6.SourceFingerprint(), test7.SourceFingerprint()); | 3371 EXPECT_EQ(test6.SourceFingerprint(), test7.SourceFingerprint()); |
| 3372 } | 3372 } |
| 3373 | 3373 |
| 3374 |
| 3375 TEST_CASE(SpecialClassesHaveEmptyArrays) { |
| 3376 ObjectStore* object_store = Isolate::Current()->object_store(); |
| 3377 Class& cls = Class::Handle(); |
| 3378 Object& array = Object::Handle(); |
| 3379 |
| 3380 cls = object_store->null_class(); |
| 3381 array = cls.fields(); |
| 3382 EXPECT(!array.IsNull()); |
| 3383 EXPECT(array.IsArray()); |
| 3384 array = cls.functions(); |
| 3385 EXPECT(!array.IsNull()); |
| 3386 EXPECT(array.IsArray()); |
| 3387 |
| 3388 cls = Object::void_class(); |
| 3389 array = cls.fields(); |
| 3390 EXPECT(!array.IsNull()); |
| 3391 EXPECT(array.IsArray()); |
| 3392 array = cls.functions(); |
| 3393 EXPECT(!array.IsNull()); |
| 3394 EXPECT(array.IsArray()); |
| 3395 |
| 3396 cls = Object::dynamic_class(); |
| 3397 array = cls.fields(); |
| 3398 EXPECT(!array.IsNull()); |
| 3399 EXPECT(array.IsArray()); |
| 3400 array = cls.functions(); |
| 3401 EXPECT(!array.IsNull()); |
| 3402 EXPECT(array.IsArray()); |
| 3403 } |
| 3404 |
| 3374 } // namespace dart | 3405 } // namespace dart |
| OLD | NEW |