Summary
This PR adds a new unit test test_error_messages to verify that all PSBTError enum values return the correct error messages from the PSBTErrorString() function in messages.cpp.
Motivation
- Ensures complete test coverage of the PSBTErrorString()function insrc/common/messages.cpp
- Provides regression protection against accidental changes to user-facing error messages
- Documents the expected error messages for all PSBT error cases
Changes
- Added: test_error_messages()unit test insrc/wallet/test/psbt_wallet_tests.cpp
- Added: Required includes for <common/messages.h>and<common/types.h>
- Tests: All 7 PSBTErrorenum values with their expected error message strings
Testing
0# Run the specific test
1./build/bin/test_bitcoin --run_test=psbt_wallet_tests
More Context
mentioned in: #31622 #31622 (review)