aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-08-19 09:28:11 +0200
committerDavid Robillard <d@drobilla.net>2018-09-29 14:47:38 +0200
commit13720ea9fff1322ffd6dc6c825bc3183d62c6f68 (patch)
tree68d1499d507b35e48425473de42e1488685b929f
parent8bf175b6739e6f84128b1783c018b5c0923670cb (diff)
downloadchilbert-13720ea9fff1322ffd6dc6c825bc3183d62c6f68.tar.gz
chilbert-13720ea9fff1322ffd6dc6c825bc3183d62c6f68.tar.bz2
chilbert-13720ea9fff1322ffd6dc6c825bc3183d62c6f68.zip
Fix undefined behaviour in test assertion
-rw-r--r--test/test_bitvec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_bitvec.cpp b/test/test_bitvec.cpp
index 178b39a..0b6e534 100644
--- a/test/test_bitvec.cpp
+++ b/test/test_bitvec.cpp
@@ -253,7 +253,7 @@ test_gray_code(Context& ctx)
grayCode(r);
if (N > 0) {
- assert(r == (v ^ (v >> 1)));
+ assert(N == 1 || r == (v ^ (v >> 1)));
T s = r;
grayCodeInv(s);