test: Misc refactor to get rid of &foo[0] raw pointers #21840
pull MarcoFalke wants to merge 3 commits into bitcoin:master from MarcoFalke:2105-testRefactor changing 3 files +20 −31-
MarcoFalke commented at 9:52 am on May 3, 2021: memberSimplify test code
-
test: Use loop to register RPCs
The same loop is used by the server, so no need for the tests to do this differently.
-
test: Use throwing variant accessor
It does not matter if the tests fail due to a BOOST_CHECK failure or due to a thrown exception. Prefer the exception because it is less code. Example fail with the throwing accessor: unknown location(0): fatal error: in "script_standard_tests/script_standard_ExtractDestinations": std::bad_variant_access: std::get: wrong index for variant test/script_standard_tests.cpp(314): last checkpoint *** 1 failure is detected in the test module "Bitcoin Core Test Suite"
-
bench: Remove duplicate constants fa8a88849c
-
MarcoFalke renamed this:
test: Misc refactor to get rid of &foo[0] raw byte pointers
test: Misc refactor to get rid of &foo[0] raw pointers
on May 3, 2021 -
fanquake added the label Tests on May 3, 2021
-
practicalswift commented at 10:20 am on May 3, 2021: contributorConcept ACK
-
Empact commented at 4:10 pm on May 3, 2021: member
Code Review ACK fa8a88849c08c810a82338bf0e70738eb6748906
Re: 000098f, this is a stricter check, always applied, so seems an improvement to me. -
MarcoFalke commented at 4:37 pm on May 3, 2021: member
000098f, this is a stricter check
It should be equally strict. Both would pass/fail the unit tests under the same conditions.
-
Empact commented at 5:02 pm on May 3, 2021: memberAgreed, thanks.
-
practicalswift commented at 6:10 pm on May 3, 2021: contributorcr ACK fa8a88849c08c810a82338bf0e70738eb6748906
-
in src/qt/test/rpcnestedtests.cpp:38 in fa2197c8b3 outdated
34@@ -35,14 +35,16 @@ static RPCHelpMan rpcNestedTest_rpc() 35 } 36 37 static const CRPCCommand vRPCCommands[] = { 38- {"test", &rpcNestedTest_rpc}, 39+ {"rpcNestedTest", &rpcNestedTest_rpc},
promag commented at 0:07 am on May 4, 2021:fa2197c8b3178787d99e2acb5c3c717df14ddabf
nit, change to category seems unnecessary.
MarcoFalke commented at 4:48 am on May 4, 2021:Ah right. :facepalm: I thought this is the name and needs to be adjusted, but yeah. Going to leave as is, because it doesn’t matter.promag commented at 0:12 am on May 4, 2021: memberCode review ACK fa8a88849c08c810a82338bf0e70738eb6748906.MarcoFalke merged this on May 4, 2021MarcoFalke closed this on May 4, 2021
MarcoFalke deleted the branch on May 4, 2021sidhujag referenced this in commit 276e41efa8 on May 4, 2021gwillen referenced this in commit 5a7343536d on Jun 1, 2022DrahtBot locked this on Aug 18, 2022
MarcoFalke practicalswift Empact promagLabels
Tests
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 18:12 UTC
More mirrored repositories can be found on mirror.b10c.me