Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: src/vm/object_map_test.cc

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/vm/object_map.cc ('k') | src/vm/object_memory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dartino 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 dartino {
10 10
11 TEST_CASE(ObjectMap) { 11 TEST_CASE(ObjectMap) {
12 ObjectMap map(256); 12 ObjectMap map(256);
13 for (int i = 0; i < 1024; i++) { 13 for (int i = 0; i < 1024; i++) {
14 map.Add(i, Smi::FromWord(i)); 14 map.Add(i, Smi::FromWord(i));
15 } 15 }
16 EXPECT_EQ(1024, map.size()); 16 EXPECT_EQ(1024, map.size());
17 17
18 for (int i = 0; i < 1024; i++) { 18 for (int i = 0; i < 1024; i++) {
19 EXPECT_EQ(i, Smi::cast(map.LookupById(i))->value()); 19 EXPECT_EQ(i, Smi::cast(map.LookupById(i))->value());
(...skipping 20 matching lines...) Expand all
40 40
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 dartino
OLDNEW
« no previous file with comments | « src/vm/object_map.cc ('k') | src/vm/object_memory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698