From 1d8e9c6d94eed3482ad5b5ccabf1a6c1f9569962 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Sun, 25 Jan 2026 12:36:34 -0500 Subject: [PATCH] remove obsolete tests from test_invalid_parent_assignment - Delete 'Earth should not become child of spacecraft' test (spacecraft are now in separate array) - Delete 'detect placeholder config values' test (validation now happens at load time) --- tests/test_invalid_parent_assignment.cpp | 56 ------------------------ 1 file changed, 56 deletions(-) diff --git a/tests/test_invalid_parent_assignment.cpp b/tests/test_invalid_parent_assignment.cpp index 5d3623c..bc4abf4 100644 --- a/tests/test_invalid_parent_assignment.cpp +++ b/tests/test_invalid_parent_assignment.cpp @@ -4,34 +4,6 @@ #include "../src/config_loader.h" #include -TEST_CASE("Invalid parent: Earth should not become child of spacecraft", - "[init][parent][bug]") { - const double TIME_STEP = 60.0; - - SimulationState* sim = create_simulation(10, 0, 0, TIME_STEP); - REQUIRE(load_system_config(sim, "tests/configs/earth_mars_simple.toml")); - - const int EARTH_IDX = 1; - const int SPACECRAFT_IDX = 3; - const int SUN_IDX = 0; - - REQUIRE(sim->bodies[EARTH_IDX].parent_index == SUN_IDX); - - for (int step = 0; step < 10; step++) { - update_simulation(sim); - - int earth_parent = sim->bodies[EARTH_IDX].parent_index; - - INFO("Step " << step << ": Earth's parent = " << earth_parent - << " (" << (earth_parent == SPACECRAFT_IDX ? "SPACECRAFT" : - earth_parent == SUN_IDX ? "Sun" : "Other") << ")"); - - REQUIRE(earth_parent != SPACECRAFT_IDX); - } - - destroy_simulation(sim); -} - TEST_CASE("Invalid parent: massive bodies never become children of small bodies", "[init][parent][hierarchy]") { const double TIME_STEP = 60.0; @@ -79,34 +51,6 @@ TEST_CASE("Invalid parent: massive bodies never become children of small bodies" destroy_simulation(sim); } -TEST_CASE("Invalid parent: detect placeholder config values", - "[init][config][validation]") { - const double TIME_STEP = 60.0; - - SimulationState* sim = create_simulation(10, 0, 0, TIME_STEP); - REQUIRE(load_system_config(sim, "tests/configs/earth_mars_simple.toml")); - - const int EARTH_IDX = 1; - const int SPACECRAFT_IDX = 3; - - Vec3 craft_pos = sim->bodies[SPACECRAFT_IDX].global_position; - Vec3 earth_pos = sim->bodies[EARTH_IDX].global_position; - - double distance = vec3_distance(craft_pos, earth_pos); - double min_distance = sim->bodies[EARTH_IDX].radius + sim->bodies[SPACECRAFT_IDX].radius; - - INFO("Distance Earth <-> Spacecraft: " << distance << " m"); - INFO("Earth position: (" << earth_pos.x << ", " << earth_pos.y << ", " << earth_pos.z << ")"); - INFO("Spacecraft position: (" << craft_pos.x << ", " << craft_pos.y << ", " << craft_pos.z << ")"); - INFO("Earth radius: " << sim->bodies[EARTH_IDX].radius << " m"); - INFO("Spacecraft radius: " << sim->bodies[SPACECRAFT_IDX].radius << " m"); - INFO("Minimum required: " << min_distance << " m (parent radius + body radius)"); - - REQUIRE(distance >= min_distance); - - destroy_simulation(sim); -} - TEST_CASE("Mutual SOI: similar mass planets within SOI boundary", "[init][soi][mutual][edge_case]") { const double TIME_STEP = 60.0;