From 975845963a7a9345a90da9f3fa3eded7098a567c Mon Sep 17 00:00:00 2001 From: Huamonarch Date: Fri, 15 May 2026 16:36:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20bound=5Fchecker=5Fs?= =?UTF-8?q?etDetectMode=5Foverride=20=E6=B5=8B=E8=AF=95=E9=A2=84=E6=9C=9F?= =?UTF-8?q?=EF=BC=88=E5=93=A8=E5=85=B5=E5=80=BC=E5=8F=98=E7=9C=9F=E5=AE=9E?= =?UTF-8?q?=E4=B8=8B=E7=95=8C=E5=90=8E=20-999=20=E4=B8=8D=E8=B6=85?= =?UTF-8?q?=E9=99=90=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eqpalg/test/test_algorithms.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eqpalg/test/test_algorithms.cc b/eqpalg/test/test_algorithms.cc index b7cd01b..fa6ba78 100644 --- a/eqpalg/test/test_algorithms.cc +++ b/eqpalg/test/test_algorithms.cc @@ -342,11 +342,12 @@ TEST(bound_checker_setDetectMode_override) { bc.setLimits(-32768.0, 100.0); CHECK(bc.detectMode() == DetectMode::OnlyRight); - // manual override to Default + // manual override to Default, sentinel -32768 becomes real lower bound bc.setDetectMode(DetectMode::Default); CHECK(bc.detectMode() == DetectMode::Default); - // now both sides checked with sentinel values → out of lower triggers - CHECK_EQ(bc.isOutOfBounds(-999.0), true); + // -999 > -32768 → within bounds; 150 > 100 → out of upper + CHECK_EQ(bc.isOutOfBounds(-999.0), false); + CHECK_EQ(bc.isOutOfBounds(150.0), true); } // ============================================================================