aboutsummaryrefslogtreecommitdiff
path: root/src/test/base58_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* util: make EncodeBase58 consume SpansSebastian Falbesoner2020-08-121-1/+1
|
* tests: Add tests for base58-decoding of std::string:s containing non-base58 ↵practicalswift2019-12-121-0/+12
| | | | characters
* Add bounds checks in key_io before DecodeBase58CheckPieter Wuille2019-12-051-4/+4
|
* Pass a maximum output length to DecodeBase58 and DecodeBase58CheckPieter Wuille2019-11-191-0/+17
| | | | | | Also remove a needless loop in DecodeBase58 to prune zeroes in the base256 output of the conversion. The number of zeroes is implied by keeping track explicitly of the length during the loop.
* scripted-diff: test: Move setup_common to test libraryMarcoFalke2019-11-061-1/+1
| | | | | | | | | | | | | | | | | | -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-
* scripted-diff: Bump copyright headers in test, benchMarcoFalke2019-04-111-1/+1
| | | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/bench/ ./contrib/devtools/copyright_header.py update ./src/test/ -END VERIFY SCRIPT-
* scripted-diff: Rename test_bitcoin to test/setup_commonMarcoFalke2019-04-111-1/+1
| | | | | | | | | -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-
* scripted-diff: Move util files to separate directory.Jim Posen2018-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- mkdir -p src/util git mv src/util.h src/util/system.h git mv src/util.cpp src/util/system.cpp git mv src/utilmemory.h src/util/memory.h git mv src/utilmoneystr.h src/util/moneystr.h git mv src/utilmoneystr.cpp src/util/moneystr.cpp git mv src/utilstrencodings.h src/util/strencodings.h git mv src/utilstrencodings.cpp src/util/strencodings.cpp git mv src/utiltime.h src/util/time.h git mv src/utiltime.cpp src/util/time.cpp sed -i 's/<util\.h>/<util\/system\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmemory\.h>/<util\/memory\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmoneystr\.h>/<util\/moneystr\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utiltime\.h>/<util\/time\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h sed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h sed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h sed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h sed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h sed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am sed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am sed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am sed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am sed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am sed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh sed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh sed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh sed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh sed -i 's/src\\utilstrencodings\.cpp/src\\util\\strencodings\.cpp/' build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj -END VERIFY SCRIPT-
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* Split off key_io_tests from base58_testsPieter Wuille2018-02-191-137/+1
|
* Split key_io (address/key encodings) off from base58Pieter Wuille2018-02-191-0/+1
|
* Replace CBitcoinSecret with {Encode,Decode}SecretPieter Wuille2018-02-191-12/+9
|
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* test: refactor: Use absolute include paths for test data filesWladimir J. van der Laan2017-11-161-3/+3
|
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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-
* Implement BIP173 addresses and testsPieter Wuille2017-09-281-1/+18
|
* Add regtest testing to base58_testsPieter Wuille2017-09-281-16/+9
|
* Convert base58_tests from type/payload to scriptPubKey comparisonPieter Wuille2017-09-281-86/+21
|
* Introduce wrappers around CBitcoinAddressPieter Wuille2017-09-061-20/+12
| | | | | | | This patch removes the need for the intermediary Base58 type CBitcoinAddress, by providing {Encode,Decode,IsValid}Destination function that directly operate on the conversion between strings and CTxDestination.
* Declare single-argument (non-converting) constructors "explicit"practicalswift2017-08-161-2/+2
| | | | In order to avoid unintended implicit conversions.
* Remove unused Boost includespracticalswift2017-06-091-1/+0
|
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Refactor: Removed begin/end_ptr functions.Karl-Johan Alm2016-12-091-1/+1
|
* [test] Remove unused codeMarcoFalke2016-08-241-3/+0
|
* Do not shadow local variablesPavel Janík2016-06-071-2/+2
|
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* [Univalue] add univalue over subtreeJonas Schnelli2015-10-011-1/+1
| | | | similar to secp256k1 include and compile univalue over a subtree
* Remove JSON Spirit wrapper, remove JSON Spirit leftoversJonas Schnelli2015-06-041-2/+2
| | | | | | - implement find_value() function for UniValue - replace all Array/Value/Object types with UniValues, remove JSON Spirit to UniValue wrapper - remove JSON Spirit sources
* remove JSON Spirit UniValue wrapperJonas Schnelli2015-06-041-13/+13
|
* Convert tree to using univalue. Eliminate all json_spirit uses.Jeff Garzik2015-06-041-23/+17
|
* tests: add a BasicTestingSetup and apply to all testsWladimir J. van der Laan2015-03-121-1/+2
| | | | | | | | Make sure that chainparams and logging is properly initialized. Doing this for every test may be overkill, but this initialization is so simple that that does not matter. This should fix the travis issues.
* test: Remove UNITTEST paramsWladimir J. van der Laan2015-03-091-2/+2
| | | | | | | | | UNITTEST parameter are not used by any current tests, and the model (modifyable parameters) is inconvenient when unit-testing. As they are stored in a global structure eevery test would have to (re)set up its own parameters. For consistency it is also better to test with MAIN parameters.
* Remove references to X11 licenceMichael Ford2014-12-161-1/+1
|
* script: add a slew of includes all around and drop includes from script.hCory Fields2014-10-171-0/+1
| | | | Lots of files ended up with indirect includes from script.h.
* Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner2014-10-021-2/+2
| | | | UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
* Revert merge of pull #4845Wladimir J. van der Laan2014-10-021-2/+2
| | | | | | | | | | | It breaks the new mingw tests! See - https://travis-ci.org/bitcoin/bitcoin/jobs/36845581 - https://travis-ci.org/bitcoin/bitcoin/jobs/36845582 This reverts commit 470590277782cce2fe73275c74523aef59a51eab, 5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0, a25fd6be138ff2bff7e2ad6a1a789db523c0193f.
* Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner2014-09-291-2/+2
| | | | UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
* script: Fix reference into empty vector run time exceptionENikS2014-09-251-1/+1
| | | | Edit by laanwj: `begin_ptr(sourcedata) + sourcedata.size()` -> `end_ptr(sourcedata)`
* Move CScript class and dependencies to script/scriptjtimon2014-09-081-1/+1
|
* Rename script.h/.cpp to scriptutils.h/.cpp (plus remove duplicated includes)jtimon2014-09-081-1/+1
|
* Remove unnecessary dependencies for bitcoin-cliWladimir J. van der Laan2014-06-251-6/+6
| | | | | | | | | This commit removes all the unnecessary dependencies (key, core, netbase, sync, ...) from bitcoin-cli. To do this it shards the chain parameters into BaseParams, which contains just the RPC port and data directory (as used by utils and bitcoin-cli) and Params, with the rest.
* Move base58.h implementation code to base58.cppPieter Wuille2014-05-101-2/+2
|
* Add licenses for tests and test dataWladimir J. van der Laan2014-03-181-0/+4
| | | | | | | | - Add license headers to source files (years based on commit dates) in `src/test` as well as `qa` - Add `README.md` to `src/test/data` specifying MIT license Fixes #3848
* Merge pull request #3712Wladimir J. van der Laan2014-02-251-0/+6
|\ | | | | | | a3138ed add test of DecodeBase58 skipping whitespace (Christian von Roques)
| * add test of DecodeBase58 skipping whitespaceChristian von Roques2014-02-211-0/+6
| |
* | Cleanup code using forward declarations.Brandon Dahler2013-11-101-5/+12
| | | | | | | | | | | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* | Revert "Switch to using raw_utf8"Jeff Garzik2013-10-221-5/+5
| | | | | | | | This reverts commit 2ecb7555a9df1e843fd25f588819e4ca1d94b266.
* | Merge pull request #2740 from constantined/constantinedGavin Andresen2013-10-221-5/+5
|\ \ | | | | | | UTF-8 support for JSON-RPC
| * | Switch to using raw_utf8constantined2013-07-231-5/+5
| | |
* | | included-tests: generate binary data from test files for inclusion into test ↵Cory Fields2013-09-161-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | binaries This change moves test data into the binaries rather than reading them from the disk at runtime. Advantages: - Tests become distributable - Cross-compile friendly. Build on one machine and execute in an arbitrary location on another. - Easier testing for backports. Users can verify that tests pass without having to track down corresponding test data. - More trustworthy test results and easier quality assurance as tests make fewer assumptions about their environment. - Tests could theoretically run at client/daemon startup and exit on failure. Disadvantages: - Required 'hexdump' build-dependency. This is a standard bsd tool that should be usable everywhere. It is likely already installed on all build-machines. - Tests can no longer be fudged after build by altering test-data.