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

Function checkData

test/ContinuousBuffer.cpp:10–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9template<typename T>
10bool checkData(render::ContinuousBuffer<T>& buffer, typename render::ContinuousBuffer<T>::Handle handle, const std::vector<T>& data)
11{
12 auto current = buffer.getBufferStart() + buffer.getOffset(handle);
13
14 bool result = true;
15
16 for (auto i = 0; i < data.size(); ++i, ++current)
17 {
18 EXPECT_EQ(data.at(i), *current) << "Buffer data mismatch at index " << i;
19 result &= data.at(i) == *current;
20 }
21
22 return result;
23}
24
25template<typename T>
26bool checkContinuousData(render::ContinuousBuffer<T>& buffer, typename render::ContinuousBuffer<T>::Handle handle,

Callers 2

checkContinuousDataFunction · 0.85
TESTFunction · 0.85

Calls 3

getBufferStartMethod · 0.80
getOffsetMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected