MCPcopy Create free account
hub / github.com/bytedance/bolt / TEST_F

Function TEST_F

bolt/common/memory/tests/AllocationTest.cpp:42–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40class AllocationTest : public testing::Test {};
41
42TEST_F(AllocationTest, basic) {
43 ASSERT_EQ(AllocationTraits::numPagesInHugePage(), 512);
44 ASSERT_EQ(AllocationTraits::roundUpPageBytes(0), 0);
45 ASSERT_EQ(AllocationTraits::roundUpPageBytes(1), AllocationTraits::kPageSize);
46 ASSERT_EQ(
47 AllocationTraits::roundUpPageBytes(4093), AllocationTraits::kPageSize);
48 ASSERT_EQ(
49 AllocationTraits::roundUpPageBytes(4094), AllocationTraits::kPageSize);
50}
51
52// This test is to verify that Allocation doesn't merge different append buffers
53// into the same PageRun even if two buffers are contiguous in memory space.

Callers

nothing calls this directly

Calls 5

numRunsMethod · 0.80
appendMoveMethod · 0.80
appendMethod · 0.45
numPagesMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected