MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / TEST

Function TEST

tests/unittests/unittests.cc:145–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143//////////////////////////////
144
145TEST(MemStreamTest, Read) {
146 ktxStream stream;
147 const ktx_uint8_t* data = (ktx_uint8_t*)"28 bytes of rubbish to read.";
148 const size_t size = 28;
149 char readBuf[size];
150
151 ktxMemStream_construct_ro(&stream, data, size);
152 stream.read(&stream, readBuf, size);
153 EXPECT_EQ(memcmp(data, readBuf, size), 0);
154
155 ktxMemStream_destruct(&stream);
156}
157
158TEST(MemStreamTest, Write) {
159 ktxStream stream;

Callers

nothing calls this directly

Calls 9

ktxMemStream_destructFunction · 0.85
ktxMemStream_constructFunction · 0.85
ktxMemStream_getdataFunction · 0.85
bad_vulkan_allocClass · 0.85
readMethod · 0.45
writeMethod · 0.45
getsizeMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected