diff options
author | merge-script <fanquake@gmail.com> | 2024-10-08 15:27:10 +0100 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-10-08 15:27:10 +0100 |
commit | bb47b5a65761bf2fb271263a61fafb66c9b36b83 (patch) | |
tree | 7be9aea7d42aa34f0a15a4a243f9dee62b0871c0 /src | |
parent | 3fecf36c7b3d51a07f2f1b3df2e60b7bec71108d (diff) | |
parent | f50557f5d36f568b7fe65ff5e242303b16b9b258 (diff) |
Merge bitcoin/bitcoin#31038: test: Fix copy-paste in wallet/test/db_tests ostream operator
f50557f5d36f568b7fe65ff5e242303b16b9b258 test: Fix copy-paste in db_tests ostream operator (Hodlinator)
Pull request description:
Fix accidentally remaining copy-pasted variable name.
Example output when intentionally adding `expected.erase(expected.begin());` before `BOOST_CHECK_EQUAL_COLLECTIONS` in *db_tests.cpp*/`CheckPrefix`:
Before fix:
```
src/wallet/test/db_tests.cpp(61): error: in "db_tests/db_cursor_prefix_byte_test": check { actual.begin(), actual.end() } == { expected.begin(), expected.end() } has failed.
Mismatch at position 0: ("�", "�") != ("�suffix", "�suffix")
Mismatch at position 1: ("�suffix", "�suffix") != ("��", "��")
Mismatch at position 2: ("��", "��") != ("��suffix", "��suffix")
Collections size mismatch: 4 != 3
```
After fix:
```
src/wallet/test/db_tests.cpp(61): error: in "db_tests/db_cursor_prefix_byte_test": check { actual.begin(), actual.end() } == { expected.begin(), expected.end() } has failed.
Mismatch at position 0: ("�", "f") != ("�suffix", "fs")
Mismatch at position 1: ("�suffix", "fs") != ("��", "ff")
Mismatch at position 2: ("��", "ff") != ("��suffix", "ffs")
Collections size mismatch: 4 != 3
```
Super-minor issue only uncovered when tests fail, but might as well correct it.
ACKs for top commit:
maflcko:
lgtm ACK f50557f5d36f568b7fe65ff5e242303b16b9b258
tdb3:
code review ACK f50557f5d36f568b7fe65ff5e242303b16b9b258
Tree-SHA512: d36e9bc36f82f2c39e9c7585ae9e5c63f7fd07665d1d3c625709bc90168ced2f83ac7d577b4914dae2f0f101c415bf0c1ed6de98a20c96c8c0383a701cbdbe99
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/test/db_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/test/db_tests.cpp b/src/wallet/test/db_tests.cpp index 2fac356263..0e35b59d7c 100644 --- a/src/wallet/test/db_tests.cpp +++ b/src/wallet/test/db_tests.cpp @@ -28,7 +28,7 @@ inline std::ostream& operator<<(std::ostream& os, const std::pair<const Serializ { Span key{kv.first}, value{kv.second}; os << "(\"" << std::string_view{reinterpret_cast<const char*>(key.data()), key.size()} << "\", \"" - << std::string_view{reinterpret_cast<const char*>(key.data()), key.size()} << "\")"; + << std::string_view{reinterpret_cast<const char*>(value.data()), value.size()} << "\")"; return os; } |