-
Notifications
You must be signed in to change notification settings - Fork 38.8k
test: Misc refactor to get rid of &foo[0] raw pointers #21840
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The same loop is used by the server, so no need for the tests to do this differently.
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"
|
Concept ACK |
It should be equally strict. Both would pass/fail the unit tests under the same conditions. |
|
Agreed, thanks. |
|
cr ACK fa8a888 |
promag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK fa8a888.
|
|
||
| static const CRPCCommand vRPCCommands[] = { | ||
| {"test", &rpcNestedTest_rpc}, | ||
| {"rpcNestedTest", &rpcNestedTest_rpc}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, change to category seems unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right. 🤦 I thought this is the name and needs to be adjusted, but yeah. Going to leave as is, because it doesn't matter.
…inters fa8a888 bench: Remove duplicate constants (MarcoFalke) 000098f test: Use throwing variant accessor (MarcoFalke) fa2197c test: Use loop to register RPCs (MarcoFalke) Pull request description: Simplify test code ACKs for top commit: Empact: Code Review ACK fa8a888 practicalswift: cr ACK fa8a888 promag: Code review ACK fa8a888. Tree-SHA512: 6a5bebaa9a3f43e9c332f4fbff606e9ece6dc8b95a769980082cc022f8e9bde6083c1e4a0145dcbf3741f514d6e97b4198f201a1bf1370ebf43bd3a5c0f85981
Simplify test code