Chromium Code Reviews| Index: runtime/vm/os_test.cc |
| diff --git a/runtime/vm/os_test.cc b/runtime/vm/os_test.cc |
| index 499972e84526b51d6b07f4dbc26bee7b8012e9bc..339e0ee73cac5aa6fa2a352e0b1f17bc43f93c02 100644 |
| --- a/runtime/vm/os_test.cc |
| +++ b/runtime/vm/os_test.cc |
| @@ -54,4 +54,16 @@ UNIT_TEST_CASE(OsFuncs) { |
| EXPECT_LT(0U, OS::GetStackSizeLimit()); |
| } |
|
cshapiro
2012/11/30 18:02:16
2 spaces between definitions
|
| +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); |
| +} |
| + |
| } // namespace dart |