Skip to content

Commit 4898527

Browse files
committed
Fix test code
1 parent 748b5f6 commit 4898527

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

platform/test/PlatformOSWrapperTest/PlatformFixedMemoryPoolTest.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ TEST(PlatformFixedMemoryPoolTest, allocateMemory_allocated_address_is_aligned)
208208
void* p = 0;
209209
OSWrapper::Error err = pool->allocateMemory(&p);
210210
LONGS_EQUAL(OSWrapper::OK, err);
211-
LONGS_EQUAL(0, (reinterpret_cast<std::uintptr_t>(p) & 0x07));
211+
LONGS_EQUAL(0, (reinterpret_cast<std::uintptr_t>(p) & 0x03));
212212
}
213213
FixedMemoryPool::destroy(pool);
214214

@@ -220,7 +220,7 @@ TEST(PlatformFixedMemoryPoolTest, allocateMemory_allocated_address_is_aligned)
220220
void* p = 0;
221221
OSWrapper::Error err = pool2->allocateMemory(&p);
222222
LONGS_EQUAL(OSWrapper::OK, err);
223-
LONGS_EQUAL(0, (reinterpret_cast<std::uintptr_t>(p) & 0x07));
223+
LONGS_EQUAL(0, (reinterpret_cast<std::uintptr_t>(p) & 0x03));
224224
}
225225
FixedMemoryPool::destroy(pool2);
226226
}
@@ -466,7 +466,7 @@ TEST(PlatformFixedMemoryPoolTest, tryAllocateMemory_allocated_address_is_aligned
466466
void* p = 0;
467467
OSWrapper::Error err = pool->tryAllocateMemory(&p);
468468
LONGS_EQUAL(OSWrapper::OK, err);
469-
LONGS_EQUAL(0, (reinterpret_cast<std::uintptr_t>(p) & 0x07));
469+
LONGS_EQUAL(0, (reinterpret_cast<std::uintptr_t>(p) & 0x03));
470470
}
471471
FixedMemoryPool::destroy(pool);
472472

@@ -478,7 +478,7 @@ TEST(PlatformFixedMemoryPoolTest, tryAllocateMemory_allocated_address_is_aligned
478478
void* p = 0;
479479
OSWrapper::Error err = pool2->tryAllocateMemory(&p);
480480
LONGS_EQUAL(OSWrapper::OK, err);
481-
LONGS_EQUAL(0, (reinterpret_cast<std::uintptr_t>(p) & 0x07));
481+
LONGS_EQUAL(0, (reinterpret_cast<std::uintptr_t>(p) & 0x03));
482482
}
483483
FixedMemoryPool::destroy(pool2);
484484
}
@@ -617,7 +617,7 @@ TEST(PlatformFixedMemoryPoolTest, timedAllocateMemory_allocated_address_is_align
617617
void* p = 0;
618618
OSWrapper::Error err = pool->timedAllocateMemory(&p, Timeout(100));
619619
LONGS_EQUAL(OSWrapper::OK, err);
620-
LONGS_EQUAL(0, (reinterpret_cast<std::uintptr_t>(p) & 0x07));
620+
LONGS_EQUAL(0, (reinterpret_cast<std::uintptr_t>(p) & 0x03));
621621
}
622622
FixedMemoryPool::destroy(pool);
623623

@@ -629,7 +629,7 @@ TEST(PlatformFixedMemoryPoolTest, timedAllocateMemory_allocated_address_is_align
629629
void* p = 0;
630630
OSWrapper::Error err = pool2->timedAllocateMemory(&p, Timeout(100));
631631
LONGS_EQUAL(OSWrapper::OK, err);
632-
LONGS_EQUAL(0, (reinterpret_cast<std::uintptr_t>(p) & 0x07));
632+
LONGS_EQUAL(0, (reinterpret_cast<std::uintptr_t>(p) & 0x03));
633633
}
634634
FixedMemoryPool::destroy(pool2);
635635
}

0 commit comments

Comments
 (0)