aboutsummaryrefslogtreecommitdiff
path: root/src/qt/test
AgeCommit message (Collapse)Author
2017-09-08Merge #10793: Changing &var[0] to var.data()Wladimir J. van der Laan
592404f03 Changing &vec[0] to vec.data(), what 9804 missed (MeshCollider) Pull request description: This just continues the work of https://github.com/bitcoin/bitcoin/pull/9804 Modifies a lot of `&vector[]`'s to `vector.data()`'s across all the files including tests, just the stuff that 9804 missed Tree-SHA512: dd1a9dffb999dea4fba78dcc91fe02f90250db86f5c74948e1ff3e8b4036b2154b600555eaa04dece5368920aae3513bc36425dc96e4319ca1041b0928a6b656
2017-09-08Changing &vec[0] to vec.data(), what 9804 missedMeshCollider
2017-09-06Merge #11117: Prepare for non-Base58 addressesWladimir J. van der Laan
864cd2787 Move CBitcoinAddress to base58.cpp (Pieter Wuille) 5c8ff0d44 Introduce wrappers around CBitcoinAddress (Pieter Wuille) Pull request description: This patch removes the need for the intermediary Base58 type `CBitcoinAddress`, by providing {`Encode`,`Decode`,`IsValid`}`Destination` functions that directly operate on the conversion between `std::string`s and `CTxDestination`. As a side, it also fixes a number of indentation issues, and removes probably several unnecessary implicit `CTxDestination`<->`CBitcoinAddress` conversions. This change is far from complete. In follow-ups I'd like to: * Split off the specific address and key encoding logic from base58.h, and move it to a address.h or so. * Replace `CTxDestination` with a non-`boost::variant` version (which can be more efficient as `boost::variant` allocates everything on the heap, and remove the need for `boost::get<...>` and `IsValidDestination` calls everywhere). * Do the same for `CBitcoinSecret`, `CBitcoinExtKey`, and `CBitcoinExtPubKey`. However, I've tried to keep this patch to be minimally invasive, but still enough to support non-Base58 addresses. Perhaps a smaller patch is possible to hack Bech32 support into `CBitcoinAddress`, but I would consider that a move in the wrong direction. Tree-SHA512: c2c77ffb57caeadf2429b1c2562ce60e8c7be8aa9f8e51b591f354b6b441162625b2efe14c023a1ae485cf2ed417263afa35c892891dfaa7844e7fbabccab85e
2017-09-06Introduce wrappers around CBitcoinAddressPieter Wuille
This patch removes the need for the intermediary Base58 type CBitcoinAddress, by providing {Encode,Decode,IsValid}Destination function that directly operate on the conversion between strings and CTxDestination.
2017-09-06Merge #11210: Stop test_bitcoin-qt touching ~/.bitcoinWladimir J. van der Laan
dea086f49 Stop test_bitcoin-qt touching ~/.bitcoin (MeshCollider) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/11192 The directory remains unused, but this stops the tests touching ~/.bitcoin at all (namely creating it if it doesn't exist) Tree-SHA512: e59ad6b83dbc5ea2fb2761994c09933721d29668b0eef09b9d938a4ee1c67871c5125c57483ee0ea25f2385e308d275d86bcb9087dd4d502923013b4f3dbac82
2017-09-05Merge #11234: Remove redundant testutil.cpp|h filesWladimir J. van der Laan
d1138e362 Remove redundant testutil files (MeshCollider) Pull request description: The only function in testutil.cpp, `GetTempPath()` simply called `fs::temp_directory_path()` directly. This just tidies things up by removing that redundant function and the file containing it I can understand wanting a general util file for tests to use, but if there's nothing in it, we might as well remove it, it can always be added back later when it's put to use. Tree-SHA512: b923f99acf33328743755368a1aa90f5da4a7d5f61b163a4b0b894275c98db80a91edf8f051fbfb4893d970fda5a9078aae78a2672867ff521c4ca4b653c71c0
2017-09-05Remove redundant testutil filesMeshCollider
2017-09-01Stop test_bitcoin-qt touching ~/.bitcoinMeshCollider
2017-08-29rpc: Push down safe mode checksAndrew Chow
This contains most of the changes of 10563 "remove safe mode", but doesn't remove the safe mode yet, but put an `ObserveSafeMode()` check in individual calls with okSafeMode=false. This cleans up the ugly "okSafeMode" flag from the dispatch tables, which is not a concern for the RPC server. Extra-author: Wladimir J. van der Laan <laanwj@gmail.com>
2017-08-16Merge #10956: Fix typosMarcoFalke
9d5e98ff8 Fix typos. (practicalswift) Pull request description: Fix some typos not covered by #10705. Tree-SHA512: f06e9541f6ae13ef5d6731399b61795997b21a8816abeb1749c93e99a5c47354e6cbd4a3d145f4dc6ef8a13db179799a3121ecbb7288abf3e8d81cdf81500d37
2017-08-16Merge #10705: Trivial: spelling fixesMarcoFalke
f42fc1d50 doc: spelling fixes (klemens) Pull request description: patch contains some spelling fixes ( just in comments ) as found by a bot ( http://www.misfix.org, https://github.com/ka7/misspell_fixer ). Tree-SHA512: ba6046cfcd81b0783420daae7d776be92dd7b85a593e212f8f1b4403aca9b1b6af12cef7080d4ea5ed4a14952fd25e4300109a59c414e08f5395cdb9947bb750
2017-08-16doc: spelling fixesklemens
2017-08-15Merge #10964: Pass SendCoinsRecipient (208 bytes) by referenceJonas Schnelli
d3d946a29 Pass SendCoinsRecipient (208 bytes) by const reference (practicalswift) Pull request description: Pass `SendCoinsRecipient` (208 bytes) by reference. Avoid passing big parameters by value. Tree-SHA512: 504791f1b1c73badbc276db13b83e39695298d7d82a9db0e48d54e7ef02f1a8d276b0adfdece1ba1130cc214e2f0fa9a3100b5359d0ca0fe96558d3c9a786e6e
2017-08-14scripted-diff: stop using the gArgs wrappersMarko Bencun
They were temporary additions to ease the transition. -BEGIN VERIFY SCRIPT- find src/ -name "*.cpp" ! -wholename "src/util.h" ! -wholename "src/util.cpp" | xargs perl -i -pe 's/(?<!\.)(ParseParameters|ReadConfigFile|IsArgSet|(Soft|Force)?(Get|Set)(|Bool|)Arg(s)?)\(/gArgs.\1(/g' -END VERIFY SCRIPT-
2017-08-08Fix typos.practicalswift
2017-08-07scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift
instead of the macro NULL -BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp -END VERIFY SCRIPT-
2017-08-02Pass SendCoinsRecipient (208 bytes) by const referencepracticalswift
2017-07-21Qt: Use _putenv_s instead of setenv on Windows buildsBrian McMichael
2017-07-03Use TestingSetup to DRY qt rpcnestedtestsMatt Corallo
2017-06-20Merge #10536: Remove unreachable or otherwise redundant codePieter Wuille
4265bf351 Remove unreachable or otherwise redundant code (practicalswift) Tree-SHA512: bc9666ab5d20c936d78c50c0361405aca9edd116602aa9bcd71a79a904b647ac9eca0651d1a9d530189a6ac1c4e235bfc69ec1a68f7e36cc14d6848ac2206b7b
2017-06-12Remove unreachable or otherwise redundant codepracticalswift
2017-06-05scripted-diff: Remove PAIRTYPEJorge Timón
-BEGIN VERIFY SCRIPT- sed -i 's/PAIRTYPE(\([^,]*\), \([^\)]*\))/std::pair<\1, \2>/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; sed -i ':a;N;$!ba;s/#define std::pair<t1, t2> std::pair<t1, t2>\n//' ./src/utilstrencodings.h ; -END VERIFY SCRIPT-
2017-06-05scripted-diff: Remove Q_FOREACHJorge Timón
-BEGIN VERIFY SCRIPT- sed -i 's/Q_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
2017-06-01Fix bumpfee test after #10449Russell Yanofsky
Failure reported by Jorge Timón <jtimon@jtimon.cc> https://github.com/bitcoin/bitcoin/pull/10449#issuecomment-305556569
2017-05-25Fix broken q4 test buildRussell Yanofsky
Error reported by Patrick Strateman <patrick.strateman@gmail.com> https://github.com/bitcoin/bitcoin/pull/10420#issuecomment-303908782
2017-05-23Add Qt tests for wallet spends & bumpfeeRussell Yanofsky
A few code changes were needed to accompany the test: * Adding setObjectName() calls for a few Qt controls to make them easily accessible from the test. * Calling contextMenu->popup() instead of contextMenu->exec() to open the transaction list context menu without blocking the test thread. * Opening the context menu at the contextualMenu event point rather than the cursor position (this change was not strictly needed to make the test work, but is more correct). * Updating the bumped transaction row with showTransaction=true instead of false. This is needed to prevent the bumped tx from being hidden, so the last part of the test which attempts to bump the bumped tx can work. (Technically this change is a more general bugfix not limited to the testing environment, but the bug doesn't happen outside of the testing environment because in the full Qt client, a queued NotifyTransactionChanged notification causes the row to be updated twice, first with showTransaction=false, then immediately after with showTransaction=true.)
2017-05-17[test] Move some tests from qt -> walletRussell Yanofsky
After previous refactoring, the tests make more sense here.
2017-05-17[test] Add tests for some walletmodel functionsRussell Yanofsky
Add unit tests for some walletmodel functions that will be refactored & moved in the next commit.
2017-04-20wallet: Introduce database handle wrapperWladimir J. van der Laan
Abstract database handle from explicit strFilename into CWalletDBWrapper. Also move CWallet::Backup to db.cpp - as it deals with representation details this is a database specific operation.
2017-04-10Merge #10142: Run bitcoin_test-qt under minimal QPA platformWladimir J. van der Laan
bf10264 Run bitcoin_test-qt under minimal QPA platform (Russell Yanofsky) Tree-SHA512: 35782f0d7e4dcdc27d991d5a10fcffbd2d201139293fe7917ef6f7cd7ae4d3a162ebc21f83266d821ae3bad86f62d947b047bb317f6c5899df4d6bcb4c957157
2017-04-03Run bitcoin_test-qt under minimal QPA platformRussell Yanofsky
Fixes broken "make check" reported by Matt Corallo <git@bluematt.me> in https://github.com/bitcoin/bitcoin/issues/10110 Fix was suggested and initially implemented by Cory Fields <cory-nospam-@coryfields.com> in https://github.com/bitcoin/bitcoin/pull/10117#issuecomment-290275236
2017-04-03Replace uses of boost::filesystem with fsWladimir J. van der Laan
Step two in abstracting away boost::filesystem. To repeat this, simply run: ``` git ls-files \*.cpp \*.h | xargs sed -i 's/boost::filesystem/fs/g' ```
2017-04-03Replace includes of boost/filesystem.h with fs.hWladimir J. van der Laan
This is step one in abstracting the use of boost::filesystem.
2017-04-02Merge #10098: Make qt wallet test compatible with qt4Wladimir J. van der Laan
e9a6461 Make qt wallet test compatible with qt4 (Russell Yanofsky) Tree-SHA512: a3e4598986cb3c5c20aaa1d440abc886d84fcc69a6ee4079787cfc8e3a2dce655060ff95612cb15ce8b5a9b8911e4afe2281345b59a4353ec32edf3771338381
2017-03-27Make qt wallet test compatible with qt4Russell Yanofsky
Unlike Qt5, the Qt4 signals implementation doesn't allow a signal to be directly connected to a c++ lambda expression. Work around this by defining a Callback QObject with a virtual method that can forward calls to a closure. The Qt4 error was reported by Patrick Strateman <patrick.strateman@gmail.com> in https://github.com/bitcoin/bitcoin/pull/10039#issuecomment-289248763
2017-03-22Merge #10045: [trivial] Fix typos in commentsJonas Schnelli
dbf30ff [trivial] Fix typos in comments (practicalswift) Tree-SHA512: a841c96ba1a80ab57206e8ef4fa9b40ecff2244075a5539fc09f57e763bf2e92b0ed089e32a0dbac3902518dcda43d224f75a3462a560148841746560640ba70
2017-03-21[trivial] Fix typos in commentspracticalswift
2017-03-20Avoid QTimer::singleShot compile error with Qt 5.3.2Russell Yanofsky
Construct QTimer object directly, instead of relying on QTimer::singleShot overloads accepting lambdas, which weren't introduced until Qt 5.4. Avoids the following compile error in debian jessie: ``` qt/test/wallettests.cpp: In function ‘void {anonymous}::ConfirmSend()’: qt/test/wallettests.cpp:34:6: error: no matching function for call to ‘QTimer::singleShot(int, Qt::TimerType, {anonymous}::ConfirmSend()::<lambda()>)’ }); ^ qt/test/wallettests.cpp:34:6: note: candidates are: In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTimer:1:0, from ./qt/sendcoinsdialog.h:13, from qt/test/wallettests.cpp:7: /usr/include/x86_64-linux-gnu/qt5/QtCore/qtimer.h:81:17: note: static void QTimer::singleShot(int, const QObject*, const char*) static void singleShot(int msec, const QObject *receiver, const char *member); ^ /usr/include/x86_64-linux-gnu/qt5/QtCore/qtimer.h:81:17: note: no known conversion for argument 2 from ‘Qt::TimerType’ to ‘const QObject*’ /usr/include/x86_64-linux-gnu/qt5/QtCore/qtimer.h:82:17: note: static void QTimer::singleShot(int, Qt::TimerType, const QObject*, const char*) static void singleShot(int msec, Qt::TimerType timerType, const QObject *receiver, const char *member); ^ /usr/include/x86_64-linux-gnu/qt5/QtCore/qtimer.h:82:17: note: candidate expects 4 arguments, 3 provided ``` Error reported by Pavel Janík <Pavel@Janik.cz> in https://github.com/bitcoin/bitcoin/pull/9974#issuecomment-287574436
2017-03-20Avoid scoped_connection compile error with boost 1.55.0Russell Yanofsky
Construct scoped_connection directly instead of relying on copy initialization and move constructor. Avoids the following compile error in debian jessie: ``` In file included from /usr/include/boost/signals2/signal.hpp:21:0, from ./util.h:29, from ./dbwrapper.h:11, from ./txdb.h:10, from ./test/test_bitcoin.h:11, from qt/test/wallettests.cpp:11: /usr/include/boost/signals2/connection.hpp: In function ‘uint256 {anonymous}::SendCoins(CWallet&, SendCoinsDialog&, const CBitcoinAddress&, CAmount)’: /usr/include/boost/signals2/connection.hpp:234:7: error: ‘boost::signals2::scoped_connection::scoped_connection(const boost::signals2::scoped_connection&)’ is private scoped_connection(const scoped_connection &other); ^ qt/test/wallettests.cpp:47:6: error: within this context }); ^ ``` Error reported by Pavel Janík <Pavel@Janik.cz> in https://github.com/bitcoin/bitcoin/pull/9974#issuecomment-287550034
2017-03-15Add new test_bitcoin-qt static library dependenciesRussell Yanofsky
Avoids following error when qt is statically linked into the test binary, as on travis: This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".
2017-03-15Add simple qt wallet test sending a transactionRussell Yanofsky
2017-03-15Add braces to if statements in Qt test_mainRussell Yanofsky
2017-03-10Make qt test compatible with TestChain100Setup frameworkRussell Yanofsky
Reset global state after rpc tests, and remove unnecessary ECC initialization to prevent assert error if it is initialized twice.
2017-01-20trivial: squash missing field 'argNames' initializer warning in qt testsWladimir J. van der Laan
The additional initializer is for the named arguments, which are unused in the test (and unfilled global fields will be initialized to 0 anyhow), so this is a no-op apart from the warning.
2017-01-04Merge #9450: Increment MIT licence copyright header year on files modified ↵Wladimir J. van der Laan
in 2016 27765b6 Increment MIT Licence copyright header year on files modified in 2016 (isle2983)
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-12-29Qt/Test: Make sure filtering sensitive data works correctly in nested commandsLuke Dashjr
2016-12-27Add a ForceSetArg method for testingMatt Corallo
2016-12-24Un-expose mapArgs from utils.hMatt Corallo
2016-12-19Merge #9329: [Qt] Console: allow empty argumentsWladimir J. van der Laan
390bd14 [Qt] Console: don't allow empty arguments when using the comma-syntax (Jonas Schnelli) 6a32c0f Qt/Test: Check handling of empty arguments in RPC debug console (Luke Dashjr) 89c8d2c [Qt] Console: allow empty arguments (Jonas Schnelli)