diff --git a/tasks/tests/stackallocator_test.cpp b/tasks/tests/stackallocator_test.cpp index 2374606..b40cd17 100644 --- a/tasks/tests/stackallocator_test.cpp +++ b/tasks/tests/stackallocator_test.cpp @@ -300,7 +300,7 @@ void TestAlignment() { assert((void*)pchar != (void*)pint); - assert(reinterpret_cast(pint) % sizeof(int) == 0); + assert(reinterpret_cast(pint) % alignof(int) == 0); charalloc.deallocate(pchar, 3); @@ -312,7 +312,7 @@ void TestAlignment() { auto* pld = ldalloc.allocate(25); - assert(reinterpret_cast(pld) % sizeof(long double) == 0); + assert(reinterpret_cast(pld) % alignof(long double) == 0); charalloc.deallocate(pchar, 555); ldalloc.deallocate(pld, 25);