MCPcopy Create free account
hub / github.com/KDE/kdevelop / createItem

Function createItem

kdevplatform/serialization/tests/test_itemrepository.cpp:115–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113uint checksPerCycle = 10;
114
115TestItem* createItem(uint id, uint size)
116{
117 TestItem* ret;
118 char* data = new char[size];
119 uint dataSize = size - sizeof(TestItem);
120 ret = new (data) TestItem(id, dataSize);
121
122 //Fill in same random pattern
123 for (uint a = 0; a < dataSize; ++a)
124 data[sizeof(TestItem) + a] = ( char )(a + id);
125
126 return ret;
127}
128
129///@todo Add a test where the complete content is deleted again, and make sure the result has a nice structure
130///@todo More consistency and lost-space tests, especially about monster-buckets. Make sure their space is re-claimed

Callers 4

TestItemRepositoryClass · 0.85
testLeaksMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected