aboutsummaryrefslogtreecommitdiff
path: root/src/test/cuckoocache_tests.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-12-14 14:21:21 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-12-14 14:21:23 -0500
commit9133227298ad97bbb10c44ac038f614c0bd7f7c7 (patch)
treeebd3fac8968f3b342eeacb158560e383c254cf0a /src/test/cuckoocache_tests.cpp
parent6723d8e3a69406b6f2e20280aab2af2014adcbb6 (diff)
parentc84c2b8c92eb56b3b3793fc95265158f5eeb00db (diff)
Merge #14935: tests: Test for expected return values when calling functions returning a success code
c84c2b8c92 tests: Test for expected return values when calling functions returning a success code (practicalswift) Pull request description: Test for expected return values when calling functions returning a success code (instead of discarding the return values). **Note to reviewers:** The following commands can be used to verify that the only text fragments added in this PR are `BOOST_CHECK(`, `!` and `)` : ``` $ git diff HEAD~1 | grep -E '^[\-][^\-]' | cut -b2- > before.txt $ git diff HEAD~1 | grep -E '^[\+][^\+]' | cut -b2- > after.txt $ cat after.txt | sed 's/BOOST_CHECK(//g' | sed 's/));/);/g' | tr -d '!' > after-sed.txt $ diff -u before.txt after-sed.txt $ ``` Tree-SHA512: ff0863ef2046a2eda3c44e9c6b9aedfe167881f2fa58db29fef859416831233ef6502a3a11fd2322bc1a924db83df8d4a5c5879298007f2a7b085e2a7286af70
Diffstat (limited to 'src/test/cuckoocache_tests.cpp')
-rw-r--r--src/test/cuckoocache_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/cuckoocache_tests.cpp b/src/test/cuckoocache_tests.cpp
index fea1e1b841..a99e17693a 100644
--- a/src/test/cuckoocache_tests.cpp
+++ b/src/test/cuckoocache_tests.cpp
@@ -141,7 +141,7 @@ static void test_cache_erase(size_t megabytes)
set.insert(hashes_insert_copy[i]);
/** Erase the first quarter */
for (uint32_t i = 0; i < (n_insert / 4); ++i)
- set.contains(hashes[i], true);
+ BOOST_CHECK(set.contains(hashes[i], true));
/** Insert the second half */
for (uint32_t i = (n_insert / 2); i < n_insert; ++i)
set.insert(hashes_insert_copy[i]);
@@ -221,7 +221,7 @@ static void test_cache_erase_parallel(size_t megabytes)
size_t start = ntodo*x;
size_t end = ntodo*(x+1);
for (uint32_t i = start; i < end; ++i)
- set.contains(hashes[i], true);
+ BOOST_CHECK(set.contains(hashes[i], true));
});
/** Wait for all threads to finish