|
13 | 13 |
|
14 | 14 | #include <QTest> |
15 | 15 |
|
16 | | -#include <string> |
17 | 16 | #include <stdexcept> |
| 17 | +#include <string> |
18 | 18 |
|
19 | 19 | static RPCHelpMan rpcNestedTest_rpc() |
20 | 20 | { |
@@ -54,31 +54,31 @@ void RPCNestedTests::rpcNestedTests() |
54 | 54 | std::string result; |
55 | 55 | std::string result2; |
56 | 56 | std::string filtered; |
57 | | - RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo()[chain]", &filtered); //simple result filtering with path |
58 | | - QVERIFY(result=="main"); |
| 57 | + RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo()[chain]", &filtered); // simple result filtering with path |
| 58 | + QVERIFY(result == "main"); |
59 | 59 | QVERIFY(filtered == "getblockchaininfo()[chain]"); |
60 | 60 |
|
61 | | - RPCConsole::RPCExecuteCommandLine(m_node, result, "getblock(getbestblockhash())"); //simple 2 level nesting |
| 61 | + RPCConsole::RPCExecuteCommandLine(m_node, result, "getblock(getbestblockhash())"); // simple 2 level nesting |
62 | 62 | RPCConsole::RPCExecuteCommandLine(m_node, result, "getblock(getblock(getbestblockhash())[hash], true)"); |
63 | 63 |
|
64 | | - RPCConsole::RPCExecuteCommandLine(m_node, result, "getblock( getblock( getblock(getbestblockhash())[hash] )[hash], true)"); //4 level nesting with whitespace, filtering path and boolean parameter |
| 64 | + RPCConsole::RPCExecuteCommandLine(m_node, result, "getblock( getblock( getblock(getbestblockhash())[hash] )[hash], true)"); // 4 level nesting with whitespace, filtering path and boolean parameter |
65 | 65 |
|
66 | 66 | RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo"); |
67 | 67 | QVERIFY(result.starts_with("{")); |
68 | 68 |
|
69 | 69 | RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo()"); |
70 | 70 | QVERIFY(result.starts_with("{")); |
71 | 71 |
|
72 | | - RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo "); //whitespace at the end will be tolerated |
| 72 | + RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo "); // whitespace at the end will be tolerated |
73 | 73 | QVERIFY(result.starts_with("{")); |
74 | 74 |
|
75 | | - RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo()[\"chain\"]"); //Quote path identifier are allowed, but look after a child containing the quotes in the key |
| 75 | + RPCConsole::RPCExecuteCommandLine(m_node, result, "getblockchaininfo()[\"chain\"]"); // Quote path identifier are allowed, but look after a child containing the quotes in the key |
76 | 76 | QVERIFY(result == "null"); |
77 | 77 |
|
78 | | - RPCConsole::RPCExecuteCommandLine(m_node, result, "createrawtransaction [] {} 0"); //parameter not in brackets are allowed |
79 | | - RPCConsole::RPCExecuteCommandLine(m_node, result2, "createrawtransaction([],{},0)"); //parameter in brackets are allowed |
| 78 | + RPCConsole::RPCExecuteCommandLine(m_node, result, "createrawtransaction [] {} 0"); // parameter not in brackets are allowed |
| 79 | + RPCConsole::RPCExecuteCommandLine(m_node, result2, "createrawtransaction([],{},0)"); // parameter in brackets are allowed |
80 | 80 | QVERIFY(result == result2); |
81 | | - RPCConsole::RPCExecuteCommandLine(m_node, result2, "createrawtransaction( [], {} , 0 )"); //whitespace between parameters is allowed |
| 81 | + RPCConsole::RPCExecuteCommandLine(m_node, result2, "createrawtransaction( [], {} , 0 )"); // whitespace between parameters is allowed |
82 | 82 | QVERIFY(result == result2); |
83 | 83 |
|
84 | 84 | RPCConsole::RPCExecuteCommandLine(m_node, result, "getblock(getbestblockhash())[tx][0]", &filtered); |
|
0 commit comments