OLD | NEW |
1 // Copyright (c) 2014, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dartino 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 #include "src/shared/assert.h" | 5 #include "src/shared/assert.h" |
6 #include "src/vm/object_map.h" | 6 #include "src/vm/object_map.h" |
7 #include "src/shared/test_case.h" | 7 #include "src/shared/test_case.h" |
8 | 8 |
9 namespace fletch { | 9 namespace fletch { |
10 | 10 |
11 TEST_CASE(ObjectMap) { | 11 TEST_CASE(ObjectMap) { |
(...skipping 29 matching lines...) Expand all Loading... |
41 for (int i = 0; i < 1024; i++) { | 41 for (int i = 0; i < 1024; i++) { |
42 EXPECT(map.RemoveById(i)); | 42 EXPECT(map.RemoveById(i)); |
43 EXPECT(!map.RemoveById(i)); | 43 EXPECT(!map.RemoveById(i)); |
44 EXPECT(map.LookupById(i) == NULL); | 44 EXPECT(map.LookupById(i) == NULL); |
45 EXPECT_EQ(-1, map.LookupByObject(Smi::FromWord(i))); | 45 EXPECT_EQ(-1, map.LookupByObject(Smi::FromWord(i))); |
46 } | 46 } |
47 EXPECT_EQ(0, map.size()); | 47 EXPECT_EQ(0, map.size()); |
48 } | 48 } |
49 | 49 |
50 } // namespace fletch | 50 } // namespace fletch |
OLD | NEW |