20 #include <ripple/basics/contract.h>
21 #include <ripple/beast/unit_test.h>
22 #include <ripple/json/json_reader.h>
23 #include <ripple/protocol/ErrorCodes.h>
24 #include <ripple/protocol/InnerObjectFormats.h>
25 #include <ripple/protocol/STParsedJSON.h>
30 namespace InnerObjectFormatsUnitTestDetail {
42 "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
48 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
55 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
61 "TransactionType" : "SignerListSet"
67 "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
73 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
85 "TransactionType" : "SignerListSet"
91 "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
97 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
104 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
109 "TransactionType" : "SignerListSet"
115 "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
121 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
128 "Amount" : "1000000",
129 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
135 "TransactionType" : "SignerListSet"
141 "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
147 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
154 "Amount" : "10000000",
160 "TransactionType" : "SignerListSet"
174 using namespace InnerObjectFormatsUnitTestDetail;
179 for (
auto const& test : testArray)
185 Throw<std::runtime_error>(
186 "Internal InnerObjectFormatsParsedJSON error. Bad JSON.");
189 bool const noObj = !parsed.
object.has_value();
190 if (noObj == test.expectFail)
196 std::string errStr(
"Unexpected STParsedJSON result on:\n");
BEAST_DEFINE_TESTSUITE(AccountTxPaging, app, ripple)
Holds the serialized result of parsing an input JSON object.
Unserialize a JSON document into a Value.
std::optional< STObject > object
The STObject if the parse was successful.
bool contains_error(Json::Value const &json)
Returns true if the json contains an rpc error specification.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool parse(std::string const &document, Value &root)
Read a Value from a JSON document.
A transaction testing environment.