From 4d302579071803cf412141c7d6ebbfbddc0d43a9 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Mon, 20 Jun 2022 02:23:06 -0600 Subject: [PATCH] testqbsp: fix test expectation for detail_illusionary_noclipfaces_intersecting --- qbsp/test_qbsp.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qbsp/test_qbsp.cc b/qbsp/test_qbsp.cc index 44bf741b..e98e115f 100644 --- a/qbsp/test_qbsp.cc +++ b/qbsp/test_qbsp.cc @@ -770,7 +770,10 @@ TEST_CASE("detail_illusionary_noclipfaces_intersecting", "[testmaps_q1]") } // top of cross has 2 faces Z-fighting, because we disabled clipping - CHECK(2 == BSP_FindFacesAtPoint(&bsp, &bsp.dmodels[0], qvec3d(-58, -50, 120), qvec3d(0, 0, 1)).size()); + // (with qbsp3 method, there won't ever be z-fighting since we only ever generate 1 face per portal) + size_t faces_at_top = BSP_FindFacesAtPoint(&bsp, &bsp.dmodels[0], qvec3d(-58, -50, 120), qvec3d(0, 0, 1)).size(); + CHECK(faces_at_top >= 1); + CHECK(faces_at_top <= 2); // interior face not clipped away CHECK(1 == BSP_FindFacesAtPoint(&bsp, &bsp.dmodels[0], qvec3d(-58, -52, 116), qvec3d(0, -1, 0)).size());