summaryrefslogtreecommitdiff
path: root/test/geometry/delaunay.cpp
diff options
context:
space:
mode:
authormzuenni <michi.zuendorf@gmail.com>2025-07-10 17:40:18 +0200
committermzuenni <michi.zuendorf@gmail.com>2025-07-10 17:40:18 +0200
commit630a5bdf06d59b8340fb4bfc0e692cbcf094026a (patch)
treeadee732c8d2cdcb46e5f400611c370b4c2ec1947 /test/geometry/delaunay.cpp
parent609d5a3bf490cfa151b40e60cb62c8ff751bbe56 (diff)
run with sanitizer
Diffstat (limited to 'test/geometry/delaunay.cpp')
-rw-r--r--test/geometry/delaunay.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/geometry/delaunay.cpp b/test/geometry/delaunay.cpp
index 5740b95..06ad6b5 100644
--- a/test/geometry/delaunay.cpp
+++ b/test/geometry/delaunay.cpp
@@ -69,9 +69,9 @@ bool inOutCirc(pt a, pt b, pt c, pt p) {
}
-void stress_test(ll range) {
+void stress_test(ll LIM, ll range) {
ll queries = 0;
- for (int tries = 0; tries < 100'000; tries++) {
+ for (int tries = 0; tries < LIM; tries++) {
int n = Random::integer<int>(3, 30);
auto ps = Random::points<lll>(n, -range, range);
bool skip = true;
@@ -137,8 +137,14 @@ void performance_test() {
}
int main() {
- stress_test(10);
- stress_test(10'000);
- stress_test(1'000'000'000);
- performance_test();
+ if (!sanitize) {
+ stress_test(100'000, 10);
+ stress_test(100'000, 10'000);
+ stress_test(100'000, 1'000'000'000);
+ performance_test();
+ } else {
+ stress_test(10'000, 10);
+ stress_test(10'000, 10'000);
+ stress_test(10'000, 1'000'000'000);
+ }
}