Skip to content

Commit 2755b2b

Browse files
committed
Merge #18010: test: rename test suite name "tx_validationcache_tests" to match filename
b3c4d9b test: rename test suite name "tx_validationcache_tests" to match filename (Sebastian Falbesoner) Pull request description: Quoting `src/test/README.md`, '`Adding test cases`': > "The file naming convention is `<source_filename>_tests.cpp` > and such files should wrap their tests in a test suite > called `<source_filename>_tests`." Currently the unit test source file `txvalidationcache_tests.cpp` contains a unit test suite with the name `tx_validationcache_tests`, which is fixed by this PR. The following shell script shows that this is the only mismatch and for all other unit test source files the test suite names are correct: ``` #!/bin/bash shopt -s globstar for test_full_filename in **/*_tests.cpp; do test_name_file=`basename $test_full_filename .cpp` test_name_suite=`sed -n "s/^.*TEST_SUITE(\(.*_tests\).*$/\1/p" $test_full_filename` if [ $test_name_file != $test_name_suite ]; then echo "TestFilename: $test_name_file != TestSuitname: $test_name_suite" fi done ``` ACKs for top commit: practicalswift: ACK b3c4d9b -- expected naming is better than unexpected naming :) kristapsk: ACK b3c4d9b Tree-SHA512: 29d409b1eb22057ee2cc407508e2580d2bc03f412401df11b8ecf77be5ada6bda8f7d2cb5338c5e079490fa12242c1fd6230a09e47252c1b0d9fe535a828ca4c
2 parents 3774281 + b3c4d9b commit 2755b2b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

contrib/devtools/test_deterministic_coverage.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ NON_DETERMINISTIC_TESTS=(
2121
"miner_tests/CreateNewBlock_validity" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10)
2222
"scheduler_tests/manythreads" # scheduler.cpp: CScheduler::serviceQueue()
2323
"scheduler_tests/singlethreadedscheduler_ordered" # scheduler.cpp: CScheduler::serviceQueue()
24-
"tx_validationcache_tests/checkinputs_test" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10)
25-
"tx_validationcache_tests/tx_mempool_block_doublespend" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10)
24+
"txvalidationcache_tests/checkinputs_test" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10)
25+
"txvalidationcache_tests/tx_mempool_block_doublespend" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10)
2626
"txindex_tests/txindex_initial_sync" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10)
2727
"txvalidation_tests/tx_mempool_reject_coinbase" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10)
2828
"validation_block_tests/processnewblock_signals_ordering" # validation.cpp: if (GetMainSignals().CallbacksPending() > 10)

src/test/txvalidationcache_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
bool CheckInputScripts(const CTransaction& tx, TxValidationState &state, const CCoinsViewCache &inputs, unsigned int flags, bool cacheSigStore, bool cacheFullScriptStore, PrecomputedTransactionData& txdata, std::vector<CScriptCheck> *pvChecks);
1717

18-
BOOST_AUTO_TEST_SUITE(tx_validationcache_tests)
18+
BOOST_AUTO_TEST_SUITE(txvalidationcache_tests)
1919

2020
BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup)
2121
{

0 commit comments

Comments
 (0)