Karl-Johan Alm
a5a2654bbc
test: add missing #include to fix compiler errors
2020-01-22 17:13:53 +09:00
MarcoFalke
772673dfbe
Merge #16978 : test: Seed test RNG context for each test case, print seed
...
fae43a97ca
test: Seed test RNG context for each test case, print seed (MarcoFalke)
Pull request description:
Debugging failing unit tests is hard if the failure is non-deterministic and the seed is not known.
Fix that by printing the seed and making it possible to set the seed from outside.
ACKs for top commit:
davereikher:
Tested ACK fae43a97ca
Tree-SHA512: 33d848dd1f4180d3664ecf60e9810c2a93590c05276b2c46b1e4fe6e376b45916a46b90c803bb602750ab666da3a05ce499e550024685a90b8cc38fab6667cb8
2019-11-07 10:18:40 -05:00
MarcoFalke
faec28252c
scripted-diff: test: Move setup_common to test library
...
-BEGIN VERIFY SCRIPT-
# Move files
for f in $(git ls-files src/test/lib/); do git mv $f src/test/util/; done
git mv src/test/setup_common.cpp src/test/util/
git mv src/test/setup_common.h src/test/util/
# Replace Windows paths
sed -i -e 's|\\setup_common|\\util\\setup_common|g' $(git grep -l '\\setup_common')
sed -i -e 's|src\\test\\lib\\|src\\test\\util\\|g' build_msvc/test_bitcoin/test_bitcoin.vcxproj
# Everything else
sed -i -e 's|/setup_common|/util/setup_common|g' $(git grep -l 'setup_common')
sed -i -e 's|test/lib/|test/util/|g' $(git grep -l 'test/lib/')
# Fix include guard
sed -i -e 's|BITCOIN_TEST_SETUP_COMMON_H|BITCOIN_TEST_UTIL_SETUP_COMMON_H|g' ./src/test/util/setup_common.h
sed -i -e 's|BITCOIN_TEST_LIB_|BITCOIN_TEST_UTIL_|g' $(git grep -l 'BITCOIN_TEST_LIB_')
-END VERIFY SCRIPT-
2019-11-06 11:56:41 -05:00
Jon Layton
7aad3b68e7
doc: Doxygen-friendly CuckooCache comments
2019-10-10 15:47:39 -04:00
MarcoFalke
fae43a97ca
test: Seed test RNG context for each test case, print seed
2019-10-09 11:20:12 -04:00
MarcoFalke
faf400077d
scripted-diff: Bump copyright headers in test, bench
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./src/bench/
./contrib/devtools/copyright_header.py update ./src/test/
-END VERIFY SCRIPT-
2019-04-11 13:34:43 -04:00
MarcoFalke
fa821904bf
scripted-diff: Rename test_bitcoin to test/setup_common
...
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/test_bitcoin\.(h|cpp)/setup_common.\1/g' $(git grep -l test_bitcoin)
git mv ./src/test/test_bitcoin.h ./src/test/setup_common.h
git mv ./src/test/test_bitcoin.cpp ./src/test/setup_common.cpp
sed -i -e 's/BITCOIN_TEST_TEST_BITCOIN_H/BITCOIN_TEST_SETUP_COMMON_H/g' ./src/test/setup_common.h
-END VERIFY SCRIPT-
2019-04-11 10:12:36 -04:00
practicalswift
d98a29ec40
Fix cuckoocache_tests TSAN failure introduced in #14935 . Fixes #14967 .
2018-12-15 16:14:36 +01:00
MarcoFalke
9133227298
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
2018-12-14 14:21:23 -05:00
practicalswift
c84c2b8c92
tests: Test for expected return values when calling functions returning a success code
2018-12-13 09:37:23 +01:00
Pieter Wuille
fd3e7973ff
Make unit tests use the insecure_rand_ctx exclusively
2018-12-12 14:22:12 -08:00
practicalswift
f34c8c466a
Make objects in range declarations immutable by default. Avoid unnecessary copying of objects in range declarations.
2018-08-27 18:19:33 +02:00
DrahtBot
eb7daf4d60
Update copyright headers to 2018
2018-07-27 07:15:02 -04:00
practicalswift
ea49e06c82
tests: Fix incorrect documentation for test case cuckoocache_hit_rate_ok
2018-06-27 19:04:26 +02:00
practicalswift
c3f34d06be
Make it clear which functions that are intended to be translation unit local
...
Do not share functions that are meant to be translation unit local with
other translation units. Use internal linkage for those consistently.
2018-05-03 21:47:40 +02:00
Dimitris Apostolou
4d9b4256d8
Fix typos
2018-03-21 08:34:44 +02:00
Akira Takizawa
595a7bab23
Increment MIT Licence copyright header year on files modified in 2017
2018-01-03 02:26:56 +09:00
MeshCollider
1a445343f6
scripted-diff: Replace #include "" with #include <> (ryanofsky)
...
-BEGIN VERIFY SCRIPT-
for f in \
src/*.cpp \
src/*.h \
src/bench/*.cpp \
src/bench/*.h \
src/compat/*.cpp \
src/compat/*.h \
src/consensus/*.cpp \
src/consensus/*.h \
src/crypto/*.cpp \
src/crypto/*.h \
src/crypto/ctaes/*.h \
src/policy/*.cpp \
src/policy/*.h \
src/primitives/*.cpp \
src/primitives/*.h \
src/qt/*.cpp \
src/qt/*.h \
src/qt/test/*.cpp \
src/qt/test/*.h \
src/rpc/*.cpp \
src/rpc/*.h \
src/script/*.cpp \
src/script/*.h \
src/support/*.cpp \
src/support/*.h \
src/support/allocators/*.h \
src/test/*.cpp \
src/test/*.h \
src/wallet/*.cpp \
src/wallet/*.h \
src/wallet/test/*.cpp \
src/wallet/test/*.h \
src/zmq/*.cpp \
src/zmq/*.h
do
base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-
2017-11-16 08:23:01 +13:00
practicalswift
49de096c2a
Remove unused Boost includes
2017-06-09 10:25:26 +02:00
Pieter Wuille
90620d66c9
scripted-diff: Rename cuckoo tests' local rand context
...
-BEGIN VERIFY SCRIPT-
sed -i 's/insecure_rand/local_rand_ctx/g' src/test/cuckoocache_tests.cpp
-END VERIFY SCRIPT-
2017-06-05 12:44:44 -07:00
Jeremy Rubin
f9c88079df
Deduplicate SignatureCacheHasher
...
This moves the SignatureCacheHasher to the sigcache header, out of the anonymous
namespace, so that the tests can import it.
2017-04-12 14:42:41 -07:00
Jeremy Rubin
3f098cccf6
Decrease testcase sizes in cuckoocache tests
2017-03-30 15:30:45 -04:00
practicalswift
dbf30ff10f
[trivial] Fix typos in comments
2017-03-21 19:49:08 +01:00
Lauda
5c66d41b7f
[Trivial] Grammar and typo correction
...
Minor corrections in src\test\* .
2017-01-22 13:18:51 +01:00
Jeremy Rubin
67dac4e193
Add unit tests for the CuckooCache
...
SQUASHME: Update Tests for other SQUASHMEs
2016-12-14 16:02:22 -05:00