summaryrefslogtreecommitdiff
path: root/test/string
diff options
context:
space:
mode:
Diffstat (limited to 'test/string')
-rw-r--r--test/string/ahoCorasick.cpp2
-rw-r--r--test/string/deBruijn.cpp2
-rw-r--r--test/string/duval.cpp4
-rw-r--r--test/string/kmp.cpp4
-rw-r--r--test/string/longestCommonSubsequence.cpp2
-rw-r--r--test/string/lyndon.cpp2
-rw-r--r--test/string/manacher.cpp2
-rw-r--r--test/string/rollingHash.cpp8
-rw-r--r--test/string/rollingHashCf.cpp8
-rw-r--r--test/string/suffixArray.cpp2
-rw-r--r--test/string/suffixAutomaton.cpp2
-rw-r--r--test/string/suffixTree.cpp2
-rw-r--r--test/string/trie.cpp2
-rw-r--r--test/string/z.cpp2
14 files changed, 22 insertions, 22 deletions
diff --git a/test/string/ahoCorasick.cpp b/test/string/ahoCorasick.cpp
index c3361d6..3203855 100644
--- a/test/string/ahoCorasick.cpp
+++ b/test/string/ahoCorasick.cpp
@@ -72,5 +72,5 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/string/deBruijn.cpp b/test/string/deBruijn.cpp
index 6b3fea4..09ba611 100644
--- a/test/string/deBruijn.cpp
+++ b/test/string/deBruijn.cpp
@@ -39,5 +39,5 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/string/duval.cpp b/test/string/duval.cpp
index 58b4a44..0475386 100644
--- a/test/string/duval.cpp
+++ b/test/string/duval.cpp
@@ -79,7 +79,7 @@ void performance_test_minrotation() {
int main() {
stress_test_duval();
- performance_test_duval();
+ if (!sanitize) performance_test_duval();
stress_test_minrotation();
- performance_test_minrotation();
+ if (!sanitize) performance_test_minrotation();
}
diff --git a/test/string/kmp.cpp b/test/string/kmp.cpp
index 9c9c924..f70a887 100644
--- a/test/string/kmp.cpp
+++ b/test/string/kmp.cpp
@@ -78,8 +78,8 @@ void performance_test_kmp() {
int main() {
cerr << "preprocessing:" << endl;
stress_test_preprocessing();
- performance_test_preprocessing();
+ if (!sanitize) performance_test_preprocessing();
cerr << "kmp:" << endl;
stress_test_kmp();
- performance_test_kmp();
+ if (!sanitize) performance_test_kmp();
}
diff --git a/test/string/longestCommonSubsequence.cpp b/test/string/longestCommonSubsequence.cpp
index 6d7a6c5..68ec71b 100644
--- a/test/string/longestCommonSubsequence.cpp
+++ b/test/string/longestCommonSubsequence.cpp
@@ -51,5 +51,5 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/string/lyndon.cpp b/test/string/lyndon.cpp
index ecf2dad..905bf8e 100644
--- a/test/string/lyndon.cpp
+++ b/test/string/lyndon.cpp
@@ -57,5 +57,5 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/string/manacher.cpp b/test/string/manacher.cpp
index 503d181..bde1c89 100644
--- a/test/string/manacher.cpp
+++ b/test/string/manacher.cpp
@@ -45,5 +45,5 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/string/rollingHash.cpp b/test/string/rollingHash.cpp
index 0491bc0..ba8fc40 100644
--- a/test/string/rollingHash.cpp
+++ b/test/string/rollingHash.cpp
@@ -37,13 +37,13 @@ void testTiny() {
cerr << "tiny: ok" << endl;
}
-void testSmall() {
+void testSmall(int depth) {
set<decltype(getHash(""))> got;
ll expected = 0;
auto dfs = [&](auto&& self, string pref)->void {
expected++;
got.insert(getHash(pref));
- if(sz(pref) >= 5) return;
+ if(sz(pref) >= depth) return;
for (char c = 'a'; c <= 'z'; c++) {
self(self, pref + c);
}
@@ -86,7 +86,7 @@ void performance_test() {
int main() {
testThueMorse();
testTiny();
- testSmall();
+ testSmall(sanitize ? 4 : 5);
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/string/rollingHashCf.cpp b/test/string/rollingHashCf.cpp
index 79003de..9acce2d 100644
--- a/test/string/rollingHashCf.cpp
+++ b/test/string/rollingHashCf.cpp
@@ -39,13 +39,13 @@ void testTiny() {
cerr << "tiny: ok" << endl;
}
-void testSmall() {
+void testSmall(int depth) {
set<decltype(getHash(""))> got;
ll expected = 0;
auto dfs = [&](auto&& self, string pref)->void {
expected++;
got.insert(getHash(pref));
- if(sz(pref) >= 5) return;
+ if(sz(pref) >= depth) return;
for (char c = 'a'; c <= 'z'; c++) {
self(self, pref + c);
}
@@ -88,7 +88,7 @@ void performance_test() {
int main() {
testThueMorse();
testTiny();
- testSmall();
+ testSmall(sanitize ? 4 : 5);
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/string/suffixArray.cpp b/test/string/suffixArray.cpp
index 4945d8e..1314155 100644
--- a/test/string/suffixArray.cpp
+++ b/test/string/suffixArray.cpp
@@ -57,5 +57,5 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/string/suffixAutomaton.cpp b/test/string/suffixAutomaton.cpp
index c2ff511..146ae11 100644
--- a/test/string/suffixAutomaton.cpp
+++ b/test/string/suffixAutomaton.cpp
@@ -58,5 +58,5 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/string/suffixTree.cpp b/test/string/suffixTree.cpp
index c0d79e4..9181c2e 100644
--- a/test/string/suffixTree.cpp
+++ b/test/string/suffixTree.cpp
@@ -46,5 +46,5 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/string/trie.cpp b/test/string/trie.cpp
index 45d89cf..1ea5b1a 100644
--- a/test/string/trie.cpp
+++ b/test/string/trie.cpp
@@ -54,5 +54,5 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}
diff --git a/test/string/z.cpp b/test/string/z.cpp
index f890a3e..f190482 100644
--- a/test/string/z.cpp
+++ b/test/string/z.cpp
@@ -37,5 +37,5 @@ void performance_test() {
int main() {
stress_test();
- performance_test();
+ if (!sanitize) performance_test();
}