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

Side by Side Diff: runtime/vm/freelist_test.cc

Issue 9189003: Move assert.h/assert.cc from runtime/vm to runtime/platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Check for correct rebase Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/freelist.h ('k') | runtime/vm/growable_array_test.cc » ('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) 2011, 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/assert.h" 5 #include "platform/assert.h"
6 #include "vm/freelist.h" 6 #include "vm/freelist.h"
7 #include "vm/unit_test.h" 7 #include "vm/unit_test.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
11 TEST_CASE(FreeList) { 11 TEST_CASE(FreeList) {
12 FreeList* free_list = new FreeList(); 12 FreeList* free_list = new FreeList();
13 intptr_t kBlobSize = 1 * MB; 13 intptr_t kBlobSize = 1 * MB;
14 intptr_t kSmallObjectSize = 4 * kWordSize; 14 intptr_t kSmallObjectSize = 4 * kWordSize;
15 intptr_t kMediumObjectSize = 16 * kWordSize; 15 intptr_t kMediumObjectSize = 16 * kWordSize;
(...skipping 28 matching lines...) Expand all
44 EXPECT_EQ(small_object4 + kSmallObjectSize, large_object); 44 EXPECT_EQ(small_object4 + kSmallObjectSize, large_object);
45 // Get another large object from the large unallocated remainder. 45 // Get another large object from the large unallocated remainder.
46 uword large_object2 = free_list->TryAllocate(kLargeObjectSize); 46 uword large_object2 = free_list->TryAllocate(kLargeObjectSize);
47 EXPECT_EQ(small_object3 + kSmallObjectSize, large_object2); 47 EXPECT_EQ(small_object3 + kSmallObjectSize, large_object2);
48 // Delete the memory associated with the test. 48 // Delete the memory associated with the test.
49 free(reinterpret_cast<void*>(blob)); 49 free(reinterpret_cast<void*>(blob));
50 delete free_list; 50 delete free_list;
51 } 51 }
52 52
53 } // namespace dart 53 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/freelist.h ('k') | runtime/vm/growable_array_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698