remove slightly incorrect test

The mime type need not be checked during embedded buffer decoding, if the image
is an external uri. Maybe we should add tests and error reporting for the
asynchronous resolveExternalBuffers, but this test no longer makes sense now after
external images are explicitly supported (i.e., external uris should be ignored
initially during postProcess).
This commit is contained in:
Nithin Pranesh 2021-11-02 13:17:05 -04:00
parent 52f70e2d80
commit 12133c8b7a
2 changed files with 0 additions and 17 deletions

View File

@ -375,8 +375,6 @@ Future<ModelReaderResult> GltfReader::resolveExternalData(
Uri::resolve(baseUrl, *buffer.uri),
tHeaders)
.thenInWorkerThread(
// TODO: is this safe? result should be alive until
// the final continuation is invoked.
[pBuffer =
&buffer](std::shared_ptr<IAssetRequest>&& pRequest) {
const IAssetResponse* pResponse = pRequest->response();
@ -402,8 +400,6 @@ Future<ModelReaderResult> GltfReader::resolveExternalData(
Uri::resolve(baseUrl, *image.uri),
tHeaders)
.thenInWorkerThread(
// TODO: is this safe? result should be alive until
// the final continuation is invoked.
[pImage = &image](std::shared_ptr<IAssetRequest>&& pRequest) {
const IAssetResponse* pResponse = pRequest->response();
if (pResponse) {

View File

@ -128,19 +128,6 @@ TEST_CASE("Read TriangleWithoutIndices") {
CHECK(position[2] == glm::vec3(0.0, 1.0, 0.0));
}
TEST_CASE("Read BoxTexturedWebp (with error messages)") {
std::filesystem::path gltfFile = CesiumGltfReader_TEST_DATA_DIR;
gltfFile /= "BoxTexturedWebp/glTF/BoxTexturedWebp.gltf";
std::vector<std::byte> data = readFile(gltfFile);
CesiumGltf::GltfReader reader;
ModelReaderResult result = reader.readModel(data);
REQUIRE(result.model);
REQUIRE(result.warnings.empty());
// Expect errors, because WebP cannot be read
REQUIRE(result.errors.size() > 0);
}
TEST_CASE("Nested extras serializes properly") {
const std::string s = R"(
{