bitcoin/src/test/util
MarcoFalke fa32adf9dc
scripted-diff: TxoutType C++11 scoped enum class
-BEGIN VERIFY SCRIPT-
 # General rename helper: $1 -> $2
 rename_global() { sed -i "s/\<$1\>/$2/g" $(git grep -l "$1"); }

 # Helper to rename TxoutType $1
 rename_value() {
   sed -i "s/    TX_$1,/    $1,/g" src/script/standard.h;  # First strip the prefix in the definition (header)
   rename_global TX_$1 "TxoutType::$1";                    # Then replace globally
 }

 # Change the type globally to bring it in line with the style-guide
 # (clsses are UpperCamelCase)
 rename_global 'enum txnouttype' 'enum class TxoutType'
 rename_global      'txnouttype'            'TxoutType'

 # Now rename each enum value
 rename_value 'NONSTANDARD'
 rename_value 'PUBKEY'
 rename_value 'PUBKEYHASH'
 rename_value 'SCRIPTHASH'
 rename_value 'MULTISIG'
 rename_value 'NULL_DATA'
 rename_value 'WITNESS_V0_KEYHASH'
 rename_value 'WITNESS_V0_SCRIPTHASH'
 rename_value 'WITNESS_UNKNOWN'

-END VERIFY SCRIPT-
2020-06-21 06:41:55 -04:00
..
blockfilter.cpp scripted-diff: test: Move setup_common to test library 2019-11-06 11:56:41 -05:00
blockfilter.h scripted-diff: test: Move setup_common to test library 2019-11-06 11:56:41 -05:00
logging.cpp test: Add CreateWalletFromFile test 2020-04-26 20:23:05 -04:00
logging.h test: Add CreateWalletFromFile test 2020-04-26 20:23:05 -04:00
mining.cpp validation: Make ProcessNewBlock*() members of ChainstateManager 2020-05-21 09:56:16 -04:00
mining.h rpc: Remove mempool global from miner 2019-12-23 06:12:10 +07:00
net.cpp fuzz: Add process_messages harness 2020-04-05 10:46:24 +08:00
net.h fuzz: Add process_messages harness 2020-04-05 10:46:24 +08:00
README.md doc: Add documentation for new test/lib 2019-11-06 11:56:53 -05:00
setup_common.cpp validation: Make ProcessNewBlock*() members of ChainstateManager 2020-05-21 09:56:16 -04:00
setup_common.h refactor: Specify boost/thread/thread.hpp explicitly 2020-06-04 10:05:54 -04:00
str.cpp tests: Move CaseInsensitiveEqual to test/util/str 2019-11-05 09:23:44 +00:00
str.h [test] move string helper functions into test library 2019-11-25 01:33:17 +01:00
transaction_utils.cpp scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
transaction_utils.h scripted-diff: TxoutType C++11 scoped enum class 2020-06-21 06:41:55 -04:00
wallet.cpp Locking: Lock cs_KeyStore instead of cs_wallet in legacy keyman 2020-01-23 16:34:28 -05:00
wallet.h [test] move wallet helper functions into test library 2019-11-25 16:40:09 +01:00

Test library

This contains files for the test library, which is used by the test binaries (unit tests, benchmarks, fuzzers, gui tests).

Generally, the files in this folder should be well-separated modules. New code should be added to existing modules or (when in doubt) a new module should be created.

The utilities in here are compiled into a library, which does not hold any state. However, the main file setup_common defines the common test setup for all test binaries. The test binaries will handle the global state when they instantiate the BasicTestingSetup (or one of its derived classes).