Skip to content

Commit

Permalink
Fix: Create export/export_glb folders in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spnda committed Feb 1, 2024
1 parent d422337 commit 4f4370f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/write_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ TEST_CASE("Try writing a glTF with all buffers and images", "[write-tests]") {
auto cube = parser.loadGltfJson(&gltfDataBuffer, cubePath, options);
REQUIRE(cube.error() == fastgltf::Error::None);

std::filesystem::create_directory(path / "export");
fastgltf::FileExporter exporter;
auto error = exporter.writeGltfJson(cube.get(), path / "export" / "cube.gltf",
fastgltf::ExportOptions::PrettyPrintJson);
Expand All @@ -112,6 +113,7 @@ TEST_CASE("Try writing a GLB with all buffers and images", "[write-tests]") {
auto cube = parser.loadGltfJson(&gltfDataBuffer, cubePath, options);
REQUIRE(cube.error() == fastgltf::Error::None);

std::filesystem::create_directory(path / "export_glb");
fastgltf::FileExporter exporter;
auto error = exporter.writeGltfBinary(cube.get(), path / "export_glb" / "cube.glb");
REQUIRE(error == fastgltf::Error::None);
Expand Down

0 comments on commit 4f4370f

Please sign in to comment.