MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / TEST

Function TEST

test/GeometryStore.cpp:70–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70TEST(GeometryStore, AllocateAndDeallocate)
71{
72 render::GeometryStore store(TestSyncObjectProvider::Instance(), _testBufferObjectProvider);
73
74 std::vector<render::IGeometryStore::Slot> allocatedSlots;
75
76 // Allocate 10 slots of various sizes
77 for (auto i = 0; i < 10; ++i)
78 {
79 auto slot = store.allocateSlot((i + 5) * 20, (i + 5) * 23);
80 EXPECT_NE(slot, std::numeric_limits<render::IGeometryStore::Slot>::max()) << "Invalid slot";
81
82 allocatedSlots.push_back(slot);
83 }
84
85 for (auto slot : allocatedSlots)
86 {
87 EXPECT_NO_THROW(store.deallocateSlot(slot));
88 }
89}
90
91TEST(GeometryStore, UpdateData)
92{

Callers

nothing calls this directly

Calls 15

generateVerticesFunction · 0.85
generateIndicesFunction · 0.85
verifyAllocationFunction · 0.85
verifyAllAllocationsFunction · 0.85
reverseFunction · 0.85
allocateSlotMethod · 0.80
deallocateSlotMethod · 0.80
updateDataMethod · 0.80
updateSubDataMethod · 0.80
onFrameStartMethod · 0.80
onFrameFinishedMethod · 0.80
allocateIndexSlotMethod · 0.80

Tested by

no test coverage detected