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

Function TEST_F

tests/streamtests/streamtests.cc:336–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

334// --- Tests ---
335
336TEST_F(ktxStreamTest, CanCreateKtx1FromCppStream)
337{
338 StreambufStream ktx1Stream{std::move(_ktx1Streambuf), std::ios::in};
339 KtxTexture<ktxTexture1> texture1;
340
341 KTX_error_code err = ktxTexture1_CreateFromStream(ktx1Stream.stream(), KTX_TEXTURE_CREATE_LOAD_IMAGE_DATA_BIT,
342 texture1.pHandle());
343 EXPECT_EQ(err, KTX_SUCCESS) << "Failed to create KTX1 from C++ stream: " << ktxErrorString(err);
344 ASSERT_NE(texture1, nullptr) << "Newly-created KTX1 is null";
345 EXPECT_TRUE(ktx1Stream.destructed()) << "ktxStream should have been destructed (LOAD_IMAGE_DATA_BIT set)";
346}
347
348TEST_F(ktxStreamTest, CanCreateKtx2FromCppStream)
349{

Callers

nothing calls this directly

Calls 11

ktxErrorStringFunction · 0.85
expectSameTextureContentFunction · 0.85
streamMethod · 0.45
pHandleMethod · 0.45
destructedMethod · 0.45
seek_modeMethod · 0.45
streambufMethod · 0.45

Tested by

no test coverage detected