summaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/memory_ut.cpp
blob: 036eb43b4d51c9988cc0af5888f64ce599497333 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <library/cpp/testing/unittest/registar.h>
 
#include "memory.h" 
 
Y_UNIT_TEST_SUITE(MallocAligned) {
    Y_UNIT_TEST(Test) {
        for (size_t size = 0; size < 1000; ++size) { 
            void* ptr = MallocAligned(size, 128); 
            UNIT_ASSERT(uintptr_t(ptr) % 128 == 0); 
            FreeAligned(ptr); 
        } 
    } 
}