From d4fbbdd85e2133361c72035a131940705a768d30 Mon Sep 17 00:00:00 2001 From: mzuenni Date: Thu, 10 Jul 2025 18:07:20 +0200 Subject: try to fix tests --- test/math/longestIncreasingSubsequence.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/math') diff --git a/test/math/longestIncreasingSubsequence.cpp b/test/math/longestIncreasingSubsequence.cpp index 0ed0f91..d08cf57 100644 --- a/test/math/longestIncreasingSubsequence.cpp +++ b/test/math/longestIncreasingSubsequence.cpp @@ -30,9 +30,9 @@ vector naive(const vector& a) { return res; } -void stress_test() { +void stress_test(ll LIM) { ll queries = 0; - for (ll i = 0; i < 10'000; i++) { + for (ll i = 0; i < LIM; i++) { int n = Random::integer(1, 12); auto a = Random::integers(n, -10, 10); auto expected = naive(a); @@ -40,7 +40,7 @@ void stress_test() { if (got != expected) cerr << "error: strict" << FAIL; queries += n; } - for (ll i = 0; i < 10'000; i++) { + for (ll i = 0; i < LIM; i++) { int n = Random::integer(1, 12); auto a = Random::integers(n, -10, 10); auto expected = naive(a); @@ -71,6 +71,7 @@ void performance_test() { } int main() { - stress_test(); + stress_test(1'000); + if (!sanitize) stress_test(10'000); if (!sanitize) performance_test(); } -- cgit v1.2.3