summaryrefslogtreecommitdiff
path: root/test/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/util.h')
-rw-r--r--test/util.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/util.h b/test/util.h
index 880ff04..98fd7f6 100644
--- a/test/util.h
+++ b/test/util.h
@@ -1,3 +1,7 @@
+#ifdef SANITIZE
+# define _GLIBCXX_ASSERTIONS 1
+# define _GLIBCXX_SANITIZE_VECTOR 1
+#endif
#include <bits/stdc++.h>
using namespace std;
@@ -202,7 +206,7 @@ namespace detail {
return 30/t;
}
- double speed = benchmark();
+ double speed = sanitize ? numeric_limits<double>::infinity() : benchmark();
}
struct timer {