summaryrefslogtreecommitdiff
path: root/test/other
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/other
parent609d5a3bf490cfa151b40e60cb62c8ff751bbe56 (diff)
run with sanitizer
Diffstat (limited to 'test/other')
-rw-r--r--test/other/bitOps.cpp4
-rw-r--r--test/other/divideAndConquer.cpp2
-rw-r--r--test/other/fastSubsetSum.cpp2
-rw-r--r--test/other/josephus2.cpp2
-rw-r--r--test/other/josephusK.cpp2
-rw-r--r--test/other/knuth.cpp2
-rw-r--r--test/other/pbs.cpp4
-rw-r--r--test/other/sos.cpp2
8 files changed, 10 insertions, 10 deletions
diff --git a/test/other/bitOps.cpp b/test/other/bitOps.cpp
index 44f6297..707c3f0 100644
--- a/test/other/bitOps.cpp
+++ b/test/other/bitOps.cpp
@@ -27,7 +27,7 @@ void test_subsets() {
ll naive(ll x) {
vector<ll> bits;
- for (ll i = 0; i < 64; i++) {
+ for (ll i = 0; i < 63; i++) {
bits.push_back(x & 1);
x >>= 1;
}
@@ -35,7 +35,7 @@ ll naive(ll x) {
next_permutation(all(bits));
reverse(all(bits));
x = 0;
- for (ll i = 0, j = 1; i < 64; i++, j <<= 1) {
+ for (ll i = 0, j = 1; i < 63; i++, j <<= 1) {
if (bits[i] != 0) x |= j;
}
return x;
diff --git a/test/other/divideAndConquer.cpp b/test/other/divideAndConquer.cpp
index 6d1b444..3878758 100644
--- a/test/other/divideAndConquer.cpp
+++ b/test/other/divideAndConquer.cpp
@@ -98,6 +98,6 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/other/fastSubsetSum.cpp b/test/other/fastSubsetSum.cpp
index c61b1ea..ea40184 100644
--- a/test/other/fastSubsetSum.cpp
+++ b/test/other/fastSubsetSum.cpp
@@ -44,6 +44,6 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/other/josephus2.cpp b/test/other/josephus2.cpp
index 85a9d28..21154a1 100644
--- a/test/other/josephus2.cpp
+++ b/test/other/josephus2.cpp
@@ -37,6 +37,6 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/other/josephusK.cpp b/test/other/josephusK.cpp
index e837640..b6680b8 100644
--- a/test/other/josephusK.cpp
+++ b/test/other/josephusK.cpp
@@ -38,6 +38,6 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/other/knuth.cpp b/test/other/knuth.cpp
index aaf5059..3d6cb9b 100644
--- a/test/other/knuth.cpp
+++ b/test/other/knuth.cpp
@@ -98,6 +98,6 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/other/pbs.cpp b/test/other/pbs.cpp
index ba3b9d0..4fa4470 100644
--- a/test/other/pbs.cpp
+++ b/test/other/pbs.cpp
@@ -93,11 +93,11 @@ void performance_test() {
t.stop();
ll hash = accumulate(all(ans), 0LL);
- if (t.time > 700) cerr << "too slow: " << t.time << FAIL;
+ if (t.time > 900) cerr << "too slow: " << t.time << FAIL;
cerr << "tested performance: " << t.time << "ms (hash: " << hash << ")" << endl;
}
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/other/sos.cpp b/test/other/sos.cpp
index f3a6109..52b55ed 100644
--- a/test/other/sos.cpp
+++ b/test/other/sos.cpp
@@ -45,6 +45,6 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}