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

Unified Diff: runtime/vm/os_test.cc

Issue 11416291: Fix win32 build breakage (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add TODO to test Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/os_macos.cc ('k') | runtime/vm/os_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_test.cc
diff --git a/runtime/vm/os_test.cc b/runtime/vm/os_test.cc
index 7dd4bb8b3b8ba14f8d56ea762ab6f808bb5c5b48..a64fc824df682c488d54bc23ff60173c8714ed3d 100644
--- a/runtime/vm/os_test.cc
+++ b/runtime/vm/os_test.cc
@@ -56,15 +56,26 @@ UNIT_TEST_CASE(OsFuncs) {
UNIT_TEST_CASE(OSAlignedAllocate) {
- void* p16 = OS::AlignedAllocate(1023, 16);
- void* p32 = OS::AlignedAllocate(1025, 32);
- void* p64 = OS::AlignedAllocate(1025, 64);
- EXPECT((reinterpret_cast<intptr_t>(p16) & 15) == 0);
- EXPECT((reinterpret_cast<intptr_t>(p32) & 31) == 0);
- EXPECT((reinterpret_cast<intptr_t>(p64) & 63) == 0);
- OS::AlignedFree(p16);
- OS::AlignedFree(p32);
- OS::AlignedFree(p64);
+ // TODO(johnmccutchan): Test other alignments, once we support
+ // alignments != 16 on Mac.
+ void* p1 = OS::AlignedAllocate(1023, 16);
+ void* p2 = OS::AlignedAllocate(1025, 16);
+ void* p3 = OS::AlignedAllocate(1025, 16);
+ void* p4 = OS::AlignedAllocate(1, 16);
+ void* p5 = OS::AlignedAllocate(2, 16);
+ void* p6 = OS::AlignedAllocate(4, 16);
+ EXPECT((reinterpret_cast<intptr_t>(p1) & 15) == 0);
+ EXPECT((reinterpret_cast<intptr_t>(p2) & 15) == 0);
+ EXPECT((reinterpret_cast<intptr_t>(p3) & 15) == 0);
+ EXPECT((reinterpret_cast<intptr_t>(p4) & 15) == 0);
+ EXPECT((reinterpret_cast<intptr_t>(p5) & 15) == 0);
+ EXPECT((reinterpret_cast<intptr_t>(p6) & 15) == 0);
+ OS::AlignedFree(p1);
+ OS::AlignedFree(p2);
+ OS::AlignedFree(p3);
+ OS::AlignedFree(p4);
+ OS::AlignedFree(p5);
+ OS::AlignedFree(p6);
}
} // namespace dart
« no previous file with comments | « runtime/vm/os_macos.cc ('k') | runtime/vm/os_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698