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

Function TEST

bolt/common/memory/tests/MemoryPoolTest.cpp:733–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

731}
732
733TEST(MemoryPoolTest, GetAlignment) {
734 {
735 MemoryManager::Options options;
736 options.allocatorCapacity = kMaxMemory;
737 EXPECT_EQ(
738 MemoryAllocator::kMaxAlignment,
739 MemoryManager{options}.addRootPool()->alignment());
740 }
741 {
742 MemoryManager::Options options;
743 options.allocatorCapacity = kMaxMemory;
744 options.alignment = 64;
745 MemoryManager manager{options};
746 EXPECT_EQ(64, manager.addRootPool()->alignment());
747 }
748}
749
750TEST_P(MemoryPoolTest, MemoryManagerGlobalCap) {
751 MemoryManager::Options options;

Callers

nothing calls this directly

Calls 15

addRootPoolMethod · 0.80
addLeafChildMethod · 0.80
addAggregateChildMethod · 0.80
addLeafPoolMethod · 0.80
to_stringFunction · 0.50
alignmentMethod · 0.45
push_backMethod · 0.45
visitChildrenMethod · 0.45
reserveMethod · 0.45
allocateMethod · 0.45
sizeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected