diff --git a/test/integration/collada_world_exporter.cc b/test/integration/collada_world_exporter.cc index ffd4a1d7be6..f3d951ed9a6 100644 --- a/test/integration/collada_world_exporter.cc +++ b/test/integration/collada_world_exporter.cc @@ -17,8 +17,11 @@ #include +#include #include #include +#include +#include #include "ignition/gazebo/Server.hh" #include "ignition/gazebo/test_config.hh" @@ -95,6 +98,14 @@ TEST_F(ColladaWorldExporterFixture, ExportWorldFromFuelWithSubmesh) // The export directory should now exist. EXPECT_TRUE(common::exists(outputPath)); + // Original .dae file has two submeshes + // .sdf loads them together and a submesh alone + // Check that output has three nodes + common::ColladaLoader loader; + const common::Mesh *meshExported = loader.Load(common::joinPaths(outputPath, "meshes", + "collada_world_exporter_submesh_test.dae")); + EXPECT_EQ(3u, meshExported->SubMeshCount()); + // Cleanup common::removeAll(outputPath); } diff --git a/test/worlds/models/mesh_with_submeshes/model.sdf b/test/worlds/models/mesh_with_submeshes/model.sdf index 4bba6e8d754..973c4a7bf3a 100644 --- a/test/worlds/models/mesh_with_submeshes/model.sdf +++ b/test/worlds/models/mesh_with_submeshes/model.sdf @@ -3,6 +3,17 @@ 0 0 1 0 0 0 + + + + model://mesh_with_submeshes/meshes/mesh_with_submeshes.dae + + node_0 +
false
+
+
+
+