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

Side by Side Diff: src/vm/priority_heap_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/priority_heap.h ('k') | src/vm/process.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) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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/shared/flags.h" 6 #include "src/shared/flags.h"
7 #include "src/shared/test_case.h" 7 #include "src/shared/test_case.h"
8 8
9 #include "src/vm/priority_heap.h" 9 #include "src/vm/priority_heap.h"
10 10
11 namespace fletch { 11 namespace dartino {
12 12
13 TEST_CASE(PRIORITY_HEAP_WITH_INDEX__INCREASING) { 13 TEST_CASE(PRIORITY_HEAP_WITH_INDEX__INCREASING) {
14 const word kSize = PriorityHeapWithValueIndex<word, word>::kMinimumSize; 14 const word kSize = PriorityHeapWithValueIndex<word, word>::kMinimumSize;
15 15
16 PriorityHeapWithValueIndex<word, word> heap; 16 PriorityHeapWithValueIndex<word, word> heap;
17 for (word i = 0; i < kSize; i++) { 17 for (word i = 0; i < kSize; i++) {
18 heap.Insert(i, 10 + i); 18 heap.Insert(i, 10 + i);
19 } 19 }
20 ASSERT(heap.backing_size() == kSize); 20 ASSERT(heap.backing_size() == kSize);
21 for (word i = 0; i < kSize; i++) { 21 for (word i = 0; i < kSize; i++) {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 EXPECT_EQ(expected_priority, heap.Minimum().priority); 160 EXPECT_EQ(expected_priority, heap.Minimum().priority);
161 EXPECT_EQ(10 + i, heap.Minimum().value); 161 EXPECT_EQ(10 + i, heap.Minimum().value);
162 EXPECT(heap.ContainsValue(10 + i)); 162 EXPECT(heap.ContainsValue(10 + i));
163 heap.RemoveMinimum(); 163 heap.RemoveMinimum();
164 EXPECT(!heap.ContainsValue(10 + i)); 164 EXPECT(!heap.ContainsValue(10 + i));
165 } 165 }
166 } 166 }
167 EXPECT(heap.IsEmpty()); 167 EXPECT(heap.IsEmpty());
168 } 168 }
169 169
170 } // namespace fletch. 170 } // namespace dartino.
OLDNEW
« no previous file with comments | « src/vm/priority_heap.h ('k') | src/vm/process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698