aboutsummaryrefslogtreecommitdiff
path: root/src/test/dbwrapper_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* scripted-diff: Remove trailing whitespacesJoão Barbosa2018-07-241-6/+6
| | | | | | | | -BEGIN VERIFY SCRIPT- sed --in-place'' --regexp-extended 's/[[:space:]]+$//g' $(git grep -I --files-with-matches --extended-regexp '[[:space:]]+$' -- src test ':!*.svg' ':!src/crypto/sha256_sse4*' ':!src/leveldb' ':!src/qt/locale' ':!src/secp256k1' ':!src/univalue') -END VERIFY SCRIPT-
* Use common SetDataDir method to create temp directory in tests.winder2018-07-111-7/+7
|
* Make it clear which functions that are intended to be translation unit localpracticalswift2018-05-031-1/+1
| | | | | Do not share functions that are meant to be translation unit local with other translation units. Use internal linkage for those consistently.
* test: Fix sign for expected valuesKarl-Johan Alm2018-04-111-3/+3
| | | | A number of BOOST_CHECK_EQUAL calls would result in warnings about signs.
* Merge #12859: Bugfix: Include <memory> for std::unique_ptrWladimir J. van der Laan2018-04-051-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | a5bca13 Bugfix: Include <memory> for std::unique_ptr (Luke Dashjr) Pull request description: Not sure why all these includes were missing, but it's breaking builds for some users: https://bugs.gentoo.org/show_bug.cgi?id=652142 (Added to all files with a reference to `std::unique_ptr`) Tree-SHA512: 8a2c67513ca07b9bb52c34e8a20b15e56f8af2530310d9ee9b0a69694dd05e02e7a3683f14101a2685d457672b56addec591a0bb83900a0eb8e2a43d43200509
| * Bugfix: Include <memory> for std::unique_ptrLuke Dashjr2018-04-021-0/+2
| |
* | Fix typosDimitris Apostolou2018-03-211-1/+1
|/
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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-
* Use MakeUnique<T>(...) instead of std::unique_ptr<T>(new T(...))practicalswift2017-11-091-2/+2
|
* Use unique_ptr for dbw (CDBWrapper)practicalswift2017-11-091-6/+4
|
* Verify DBWrapper iterators are taking snapshotsMatt Corallo2017-09-301-2/+14
| | | | | | | | | | | The LevelDB docs seem to indicate that an iterator will not take snapshots (even providing instructions on how to do so yourself). In several of the places we use them, we assume snapshots to have been taken. In order to make sure LevelDB doesn't change out from under us (and to prevent the next person who reads the docs from having the same fright I did), verify that snapshots are taken in our tests.
* Declare single-argument (non-converting) constructors "explicit"practicalswift2017-08-161-1/+1
| | | | In order to avoid unintended implicit conversions.
* Use range based for loopRené Nyffenegger2017-07-161-18/+5
| | | | | Instead of iterating over 0 .. 1 and then deciding on an actual desired value, use a range based for loop for the desired value.
* Avoid dereference-of-casted-pointerPieter Wuille2017-07-071-3/+3
|
* Remove unused Boost includespracticalswift2017-06-091-2/+0
|
* scripted-diff: Use new naming style for insecure_rand* functionsPieter Wuille2017-06-071-10/+10
| | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/\<insecure_randbits(/InsecureRandBits(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_randbool(/InsecureRandBool(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_randrange(/InsecureRandRange(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_randbytes(/InsecureRandBytes(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_rand256(/InsecureRand256(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_rand(/InsecureRand32(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<seed_insecure_rand(/SeedInsecureRand(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp -END VERIFY SCRIPT-
* scripted-diff: use insecure_rand256/randrange morePieter Wuille2017-06-051-10/+10
| | | | | | | | -BEGIN VERIFY SCRIPT- sed -i "s/\<GetRandHash(/insecure_rand256(/" src/test/*_tests.cpp sed -i "s/\<GetRand(/insecure_randrange(/" src/test/*_tests.cpp src/test/test_bitcoin.cpp sed -i 's/\<insecure_rand() % \([0-9]\+\)/insecure_randrange(\1)/g' src/test/*_tests.cpp -END VERIFY SCRIPT-
* Replace uses of boost::filesystem with fsWladimir J. van der Laan2017-04-031-9/+9
| | | | | | | | | Step two in abstracting away boost::filesystem. To repeat this, simply run: ``` git ls-files \*.cpp \*.h | xargs sed -i 's/boost::filesystem/fs/g' ```
* Set to nullptr after deletepracticalswift2017-03-181-0/+2
|
* test: Replace remaining sprintf with snprintfWladimir J. van der Laan2017-02-271-3/+3
| | | | | | | | | | | Use of `sprintf` is seen as a red flag as many of its uses are insecure. OpenBSD warns about it while compiling, and some modern platforms, e.g. [cloudlibc from cloudabi](https://github.com/NuxiNL/cloudlibc) don't even provide it anymore. Although our uses of these functions are secure, it can't hurt to replace them anyway. There are only 3 occurences left, all in the tests.
* [Trivial] Grammar and typo correctionLauda2017-01-221-1/+1
| | | | Minor corrections in src\test\* .
* Merge #9281: Refactor: Remove using namespace <xxx> from bench/ & test/ sourcesMarcoFalke2017-01-051-19/+15
|\ | | | | | | 73f4119 Refactoring: Removed using namespace <xxx> from bench/ and test/ source files. (Karl-Johan Alm)
| * Refactoring: Removed using namespace <xxx> from bench/ and test/ source files.Karl-Johan Alm2017-01-021-19/+15
| |
* | Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
|/ | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Get rid of nType and nVersionPieter Wuille2016-11-071-1/+1
| | | | | | | | | | | Remove the nType and nVersion as parameters to all serialization methods and functions. There is only one place where it's read and has an impact (in CAddress), and even there it does not impact any of the recursively invoked serializers. Instead, the few places that need nType or nVersion are changed to read it directly from the stream object, through GetType() and GetVersion() methods which are added to all stream classes.
* C++11: s/boost::scoped_ptr/std::unique_ptr/Jorge Timón2016-09-011-3/+3
|
* Add test for dbwrapper iterators with same-prefix keys.Matt Corallo2016-05-171-0/+86
|
* test: Add more thorough test for dbwrapper iteratorsWladimir J. van der Laan2016-04-271-1/+35
| | | | | | | | | | | | I made a silly mistake in a database wrapper where keys were sorted by char instead of uint8_t. As x86 char is signed the sorting for the block index database was messed up, resulting in a segfault due to missing records. Add a test to catch: - Wrong sorting - Seeking errors - Iteration result not complete
* dbwrapper: Pass parent CDBWrapper into CDBBatch and CDBIteratorWladimir J. van der Laan2016-04-231-4/+4
| | | | | | | | | Pass parent wrapper directly instead of obfuscation key. This makes it possible for other databases which re-use this code to use other properties from the database. Add a namespace dbwrapper_private for private functions to be used only in dbwrapper.h/cpp and dbwrapper_tests.
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* leveldbwrapper file rename to dbwrapper.*Jeff Garzik2015-10-221-0/+207