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 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1807 other_array.SetAt(1, other_array); | 1807 other_array.SetAt(1, other_array); |
1808 EXPECT(!array.Equals(other_array)); | 1808 EXPECT(!array.Equals(other_array)); |
1809 | 1809 |
1810 other_array = Array::New(kArrayLen - 1); | 1810 other_array = Array::New(kArrayLen - 1); |
1811 other_array.SetAt(0, array); | 1811 other_array.SetAt(0, array); |
1812 other_array.SetAt(2, array); | 1812 other_array.SetAt(2, array); |
1813 EXPECT(!array.Equals(other_array)); | 1813 EXPECT(!array.Equals(other_array)); |
1814 | 1814 |
1815 EXPECT_EQ(0, Object::empty_array().Length()); | 1815 EXPECT_EQ(0, Object::empty_array().Length()); |
1816 | 1816 |
| 1817 EXPECT_EQ(1, Object::zero_array().Length()); |
| 1818 element = Object::zero_array().At(0); |
| 1819 EXPECT(Smi::Cast(element).IsZero()); |
| 1820 |
1817 array.MakeImmutable(); | 1821 array.MakeImmutable(); |
1818 Object& obj = Object::Handle(array.raw()); | 1822 Object& obj = Object::Handle(array.raw()); |
1819 EXPECT(obj.IsArray()); | 1823 EXPECT(obj.IsArray()); |
1820 } | 1824 } |
1821 | 1825 |
1822 | 1826 |
1823 TEST_CASE(StringCodePointIterator) { | 1827 TEST_CASE(StringCodePointIterator) { |
1824 const String& str0 = String::Handle(String::New("")); | 1828 const String& str0 = String::Handle(String::New("")); |
1825 String::CodePointIterator it0(str0); | 1829 String::CodePointIterator it0(str0); |
1826 EXPECT(!it0.Next()); | 1830 EXPECT(!it0.Next()); |
(...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4014 // Simple map. | 4018 // Simple map. |
4015 // | 4019 // |
4016 // TODO(turnidge): Consider showing something like: {1: 2, 2: 'otter'} | 4020 // TODO(turnidge): Consider showing something like: {1: 2, 2: 'otter'} |
4017 result = Dart_GetField(lib, NewString("simple_map")); | 4021 result = Dart_GetField(lib, NewString("simple_map")); |
4018 EXPECT_VALID(result); | 4022 EXPECT_VALID(result); |
4019 obj ^= Api::UnwrapHandle(result); | 4023 obj ^= Api::UnwrapHandle(result); |
4020 EXPECT_STREQ("Instance of '_LinkedHashMap'", obj.ToUserCString()); | 4024 EXPECT_STREQ("Instance of '_LinkedHashMap'", obj.ToUserCString()); |
4021 } | 4025 } |
4022 | 4026 |
4023 } // namespace dart | 4027 } // namespace dart |
OLD | NEW |