From 6e996d39da60006c47ea34e183164cbb4acd8af8 Mon Sep 17 00:00:00 2001 From: Cory Fields Date: Tue, 20 Jan 2015 13:35:13 +0100 Subject: tests: fix qt payment test Now that boost no longer automatically initializes openssl, we have to do it ourselves. --- src/qt/test/test_main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/qt/test/test_main.cpp') diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index bb768f132..f91de2008 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -17,6 +17,8 @@ #include #include +#include + #if defined(QT_STATICPLUGIN) && QT_VERSION < 0x050000 #include Q_IMPORT_PLUGIN(qcncodecs) @@ -36,6 +38,8 @@ int main(int argc, char *argv[]) QCoreApplication app(argc, argv); app.setApplicationName("Bitcoin-Qt-test"); + SSL_library_init(); + URITests test1; if (QTest::qExec(&test1) != 0) fInvalid = true; -- cgit v1.2.3 From fa24439ff3d8ab5b9efaf66ef4dae6713b88cb35 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Sun, 13 Dec 2015 17:58:29 +0100 Subject: Bump copyright headers to 2015 --- src/qt/test/test_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qt/test/test_main.cpp') diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index f91de2008..db193420b 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2009-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -- cgit v1.2.3 From 15860448d38ba7a436cf7c08fa5c0132fe10f8d3 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Sat, 20 Aug 2016 11:19:35 +0200 Subject: [Qt] RPC-Console: support nested commands and simple value queries Commands can be executed with bracket syntax, example: `getwalletinfo()`. Commands can be nested, example: `sendtoaddress(getnewaddress(), 10)`. Simple queries are possible: `listunspent()[0][txid]` Object values are accessed with a non-quoted string, example: [txid]. Fully backward compatible. `generate 101` is identical to `generate(101)` Result value queries indicated with `[]` require the new brackets syntax. Comma as argument separator is now also possible: `sendtoaddress,
,` Space as argument separator works also with the bracket syntax, example: `sendtoaddress(getnewaddress() 10) No dept limitation, complex commands are possible: `decoderawtransaction(getrawtransaction(getblock(getbestblockhash())[tx][0]))[vout][0][value]` --- src/qt/test/test_main.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/qt/test/test_main.cpp') diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index db193420b..dbaab54fb 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2009-2015 The Bitcoin Core developers +// Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -6,6 +6,9 @@ #include "config/bitcoin-config.h" #endif +#include "chainparams.h" +#include "key.h" +#include "rpcnestedtests.h" #include "util.h" #include "uritests.h" @@ -27,10 +30,17 @@ Q_IMPORT_PLUGIN(qtwcodecs) Q_IMPORT_PLUGIN(qkrcodecs) #endif +extern void noui_connect(); + // This is all you need to run all the tests int main(int argc, char *argv[]) { + ECC_Start(); SetupEnvironment(); + SetupNetworking(); + SelectParams(CBaseChainParams::MAIN); + noui_connect(); + bool fInvalid = false; // Don't remove this, it's needed to access @@ -48,6 +58,10 @@ int main(int argc, char *argv[]) if (QTest::qExec(&test2) != 0) fInvalid = true; #endif + RPCNestedTests test3; + if (QTest::qExec(&test3) != 0) + fInvalid = true; + ECC_Stop(); return fInvalid; } -- cgit v1.2.3 From 815f4148b2eff6c64c764e910e79677d5a67adc7 Mon Sep 17 00:00:00 2001 From: Karl-Johan Alm Date: Fri, 16 Dec 2016 16:52:35 +0900 Subject: Uses built-in byte swap if available (Apple) and if bswap_XX is undefined. Defers to pre-defined version if found (e.g. protobuf). For protobuf case, the definitions are identical and thus include order should not affect results. --- src/qt/test/test_main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/qt/test/test_main.cpp') diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp index dbaab54fb..d44d71131 100644 --- a/src/qt/test/test_main.cpp +++ b/src/qt/test/test_main.cpp @@ -11,6 +11,7 @@ #include "rpcnestedtests.h" #include "util.h" #include "uritests.h" +#include "compattests.h" #ifdef ENABLE_WALLET #include "paymentservertests.h" @@ -61,6 +62,9 @@ int main(int argc, char *argv[]) RPCNestedTests test3; if (QTest::qExec(&test3) != 0) fInvalid = true; + CompatTests test4; + if (QTest::qExec(&test4) != 0) + fInvalid = true; ECC_Stop(); return fInvalid; -- cgit v1.2.3