From b98be3695c10048f6fdd7819ffccdb3678d505eb Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Fri, 16 Oct 2026 11:51:03 -0500 Subject: [PATCH] test: close the OBJ file before removing it so the test passes on Windows Co-Authored-By: Claude Opus 5.5 --- tests/dGameTests/dZoneManagerTests/RawTests.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/dGameTests/dZoneManagerTests/RawTests.cpp b/tests/dGameTests/dZoneManagerTests/RawTests.cpp index fadac2fe8..52b381057 100644 --- a/tests/dGameTests/dZoneManagerTests/RawTests.cpp +++ b/tests/dGameTests/dZoneManagerTests/RawTests.cpp @@ -344,9 +344,11 @@ TEST_F(RawTest, WritesTheTerrainMeshAsObj) { const auto path = (std::filesystem::temp_directory_path() / "dlu_raw_test.obj").string(); ASSERT_TRUE(Raw::WriteTerrainMeshToOBJ(mesh, path)); - std::ifstream file(path); std::vector lines; - for (std::string line; std::getline(file, line);) lines.push_back(line); + { + std::ifstream file(path); + for (std::string line; std::getline(file, line);) lines.push_back(line); + } // closed before removing it (Windows can't remove an open file) std::filesystem::remove(path); ASSERT_EQ(lines.size(), 4);