diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-04-25 19:15:30 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-04-25 19:32:32 +0200 |
commit | 25ad2f75f5d105d30d2ca716a66138a6b32a8c68 (patch) | |
tree | 0836355a6740398437a4ffab523ffa78886fdde0 /src/qt/test/test_main.cpp | |
parent | a785bc3667d3c11a014da77436a23b1b865458a4 (diff) | |
parent | 5109fc4a9cb2cbd73c33197fb9129e1413ab051b (diff) |
Merge #12830: [qt] [tests] Clarify address book error messages, add tests
5109fc4 [tests] [qt] Add tests for address book manipulation via EditAddressDialog (James O'Beirne)
9c01be1 [tests] [qt] Introduce qt/test/util with a generalized ConfirmMessage (James O'Beirne)
8cdcaee [qt] Display more helpful message when adding a send address has failed (James O'Beirne)
c5b2770 Add purpose arg to Wallet::getAddress (James O'Beirne)
Pull request description:
Addresses https://github.com/bitcoin/bitcoin/issues/12796.
When a user attempts to add to the address book a sending address which is already present as a receiving address, they're presented with a confusing error indicating the address is already present in the book, despite the fact that this row is currently invisible.

This change adds a more specific error message indicating its existence as a receiving address (as discussed in the linked issue).

This change also adds some tests exercising use of the address book via QT. Adding so much test code for such a trivial change may seem weird, but it's my hope that this will make further test-writing for address book usage (and other QT features) more approachable.
Tree-SHA512: fbdd5564f7a9a2380bbe437f3378e8d4d5fd9201efff4879b72bc23f2cc1c2eecaf2b811994c25070ee052422e48e47901787c2e62cc584774a997fe6a2a327a
Diffstat (limited to 'src/qt/test/test_main.cpp')
-rw-r--r-- | src/qt/test/test_main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index 25ee66dc6b..56d4d3e457 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -13,6 +13,7 @@ #include <qt/test/compattests.h> #ifdef ENABLE_WALLET +#include <qt/test/addressbooktests.h> #include <qt/test/paymentservertests.h> #include <qt/test/wallettests.h> #endif @@ -99,6 +100,10 @@ int main(int argc, char *argv[]) if (QTest::qExec(&test5) != 0) { fInvalid = true; } + AddressBookTests test6; + if (QTest::qExec(&test6) != 0) { + fInvalid = true; + } #endif fs::remove_all(pathTemp); |