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

Side by Side Diff: platforms/stm/disco_dartino/src/page_allocator_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
OLDNEW
1 // Copyright (c) 2016, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 <stdio.h> 5 #include <stdio.h>
6 #include <cinttypes> 6 #include <cinttypes>
7 7
8 #define TESTING 8 #define TESTING
9 #include "src/shared/assert.h" 9 #include "src/shared/assert.h"
10 #include "src/shared/atomic.h" 10 #include "src/shared/atomic.h"
11 11
12 #include "platforms/stm/disco_fletch/src/page_allocator.h" 12 #include "platforms/stm/disco_dartino/src/page_allocator.h"
13 13
14 void Test() { 14 void Test() {
15 PageAllocator *allocator = new PageAllocator(); 15 PageAllocator *allocator = new PageAllocator();
16 void* arena1; 16 void* arena1;
17 int rc = posix_memalign(&arena1, PAGE_SIZE, 10); 17 int rc = posix_memalign(&arena1, PAGE_SIZE, 10);
18 EXPECT_EQ(0, rc); 18 EXPECT_EQ(0, rc);
19 uintptr_t start = reinterpret_cast<uintptr_t>(arena1); 19 uintptr_t start = reinterpret_cast<uintptr_t>(arena1);
20 int arena1_bit = allocator->AddArena("test", start, PAGE_SIZE * 10); 20 int arena1_bit = allocator->AddArena("test", start, PAGE_SIZE * 10);
21 EXPECT_EQ(1, arena1_bit); 21 EXPECT_EQ(1, arena1_bit);
22 22
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 EXPECT_EQ(0xaa, map[i]); 97 EXPECT_EQ(0xaa, map[i]);
98 } 98 }
99 99
100 free(arena); 100 free(arena);
101 } 101 }
102 102
103 int main(int argc, char** argv) { 103 int main(int argc, char** argv) {
104 Test(); 104 Test();
105 TestExternalMap(); 105 TestExternalMap();
106 } 106 }
OLDNEW
« no previous file with comments | « platforms/stm/disco_dartino/src/page_allocator.cc ('k') | platforms/stm/disco_dartino/src/syscalls.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698