From 4c4aea6abd680b62132ead1c9cc943e3e489271d Mon Sep 17 00:00:00 2001 From: Gloria Mundi Date: Thu, 20 Nov 2025 17:45:28 +0100 Subject: enable _GLIBCXX_ASSERTIONS for sanitizer tests --- test/math/millerRabin.base32.cpp | 2 +- test/math/millerRabin.cpp | 2 +- test/math/rho.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test/math') diff --git a/test/math/millerRabin.base32.cpp b/test/math/millerRabin.base32.cpp index e9a4b57..70be2f8 100644 --- a/test/math/millerRabin.base32.cpp +++ b/test/math/millerRabin.base32.cpp @@ -98,7 +98,7 @@ void extra_tests() { bool expected = ssize(factors) == 1 && factors.begin()->second == 1; if (got != expected) cerr << "error: " << x << FAIL; } - if (t.time > 10) cerr << "too slow" << FAIL; + if (!sanitize && t.time > 10) cerr << "too slow" << FAIL; cerr << "stress tested: " << t.time << "ms" << endl; } diff --git a/test/math/millerRabin.cpp b/test/math/millerRabin.cpp index e7feba1..bdcdee6 100644 --- a/test/math/millerRabin.cpp +++ b/test/math/millerRabin.cpp @@ -90,7 +90,7 @@ void extra_tests() { bool expected = ssize(factors) == 1 && factors.begin()->second == 1; if (got != expected) cerr << "error: " << x << FAIL; } - if (t.time > 10) cerr << "too slow" << FAIL; + if (!sanitize && t.time > 10) cerr << "too slow" << FAIL; cerr << "stress tested: " << t.time << "ms" << endl; } diff --git a/test/math/rho.cpp b/test/math/rho.cpp index 9943a8c..2c8a319 100644 --- a/test/math/rho.cpp +++ b/test/math/rho.cpp @@ -92,7 +92,7 @@ void stress_test() { cerr << FAIL; } } - if (t.time > 100) cerr << "too slow" << FAIL; + if (!sanitize && t.time > 100) cerr << "too slow" << FAIL; cerr << "stress tested: " << t.time << "ms" << endl; } -- cgit v1.2.3