removed old tests

This commit is contained in:
Connor
2026-02-26 16:17:07 +09:00
parent a47dff77f7
commit babc1f99f5

View File

@@ -270,38 +270,6 @@ TEST_SUITE("WorldGraph::QueryNodes") {
EvalContext ctx2 = g.MakeEvalContext(1, 0, 0); EvalContext ctx2 = g.MakeEvalContext(1, 0, 0);
CHECK(above.Evaluate(ctx2, {}).AsInt() == 1); // only y=4 is air CHECK(above.Evaluate(ctx2, {}).AsInt() == 1); // only y=4 is air
} }
TEST_CASE("QueryDistanceNode: finds adjacent tile at distance 1") {
TileGrid g(0, 0, 5, 5);
g.Set(2, 3, 1); // STONE one tile above current cell (1,3) → actually (2,3) is to the right of (1,3)
// Place STONE directly above (1,1) at (1,2)
g.Set(1, 2, 1);
EvalContext ctx = g.MakeEvalContext(1, 1, 0); // current = (1,1)
QueryDistanceNode qd(1, 4);
CHECK(qd.Evaluate(ctx, {}).AsInt() == 1); // (1,2) is Chebyshev distance 1
}
TEST_CASE("QueryDistanceNode: not found returns maxDistance+1") {
TileGrid g(0, 0, 5, 5); // all AIR
EvalContext ctx = g.MakeEvalContext(2, 2, 0);
QueryDistanceNode qd(1 /*STONE*/, 3);
CHECK(qd.Evaluate(ctx, {}).AsInt() == 4); // maxDistance+1
}
TEST_CASE("QueryDistanceNode: no previous pass returns maxDistance+1") {
EvalContext ctx; ctx.worldX = 0; ctx.worldY = 0;
QueryDistanceNode qd(1, 4);
CHECK(qd.Evaluate(ctx, {}).AsInt() == 5);
}
TEST_CASE("QueryDistanceNode: ignores current cell") {
TileGrid g(0, 0, 3, 3);
g.Set(1, 1, 1); // STONE at current cell
EvalContext ctx = g.MakeEvalContext(1, 1, 0);
QueryDistanceNode qd(1, 2); // looking for STONE
// (1,1) is self, must be skipped; no other STONE tiles → maxDistance+1
CHECK(qd.Evaluate(ctx, {}).AsInt() == 3);
}
} }
// ─────────────────────────────── GenerateRegion ────────────────────────────── // ─────────────────────────────── GenerateRegion ──────────────────────────────