#35834 Test checkunparsable errors
https://github.com/bitcoin/bitcoin/pull/35834 · · +18/-12 in 1 files, 2 commits · labels: Needs rebase
Goal
- Ensure descriptor unit tests properly verify private-form parsing error messages
- Fixes silent overwriting of expected errors in test helpers without changing production code
Fixes CheckUnparsable in src/test/descriptor_tests.cpp so that private-form parsing errors are not overwritten by public-form parsing errors. It also overloads the helper to support differing expected errors and corrects a test case where a raw descriptor parse test mistakenly supplied an sh() public descriptor.
Problem: CheckUnparsable previously reused a single error string variable for both private and public parses, silently ignoring whether the private parse yielded the expected error message.
Category: Wallet (#78 of 84)
P4 · test coverage
- P4 because it only corrects an assertion oversight in unit test code
- Does not impact production descriptor parsing or wallet behavior
Corrects an assertion oversight in unit test code without altering production descriptor parsing. Author explicitly notes: 'This PR only changes test code and does not affect production descriptor parsing.'
Membership: Modifies descriptor unit testing helpers in src/test/descriptor_tests.cpp.
Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 0
Reviewability: Stale: Needs rebase
- Needs rebase due to merge conflicts with #35445
The PR has merge conflicts with #35445 and is labeled Needs rebase.
Author status: silent since 2026-07-29
Agreement: Crickets
- No reviews or comments have been posted yet
- The pull request has received no engagement since being opened
No reviews or comments have been posted.
The PR has received no reviewer engagement since being opened.
Review verdicts (DrahtBot): 0
Files
30 lines under test/bench/ci.
- src/test/descriptor_tests.cpp +18/-12
Card
This pull request corrects the CheckUnparsable test helper in descriptor_tests.cpp so that error strings from parsing private-form descriptors are asserted rather than clobbered by the subsequent public-form parse. It also fixes a minor error in a raw descriptor test case where sh() was supplied instead of raw(). No production wallet or descriptor parsing logic is modified. The PR currently has merge conflicts and has received no reviews.