20 #include <ripple/basics/contract.h>
21 #include <ripple/protocol/InnerObjectFormats.h>
22 #include <ripple/protocol/ErrorCodes.h>
23 #include <ripple/json/json_reader.h>
24 #include <ripple/protocol/STParsedJSON.h>
25 #include <ripple/beast/unit_test.h>
30 namespace InnerObjectFormatsUnitTestDetail
44 "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
50 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
57 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
63 "TransactionType" : "SignerListSet"
69 "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
75 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
87 "TransactionType" : "SignerListSet"
93 "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
99 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
106 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
111 "TransactionType" : "SignerListSet"
117 "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
123 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
130 "Amount" : "1000000",
131 "Account" : "rPcNzota6B8YBokhYtcTNqQVCngtbnWfux",
137 "TransactionType" : "SignerListSet"
143 "Account" : "rDg53Haik2475DJx8bjMDSDPj4VX7htaMd",
149 "Account" : "rnUy2SHTrB9DubsPmkJZUXTf5FcNDGrYEA",
156 "Amount" : "10000000",
162 "TransactionType" : "SignerListSet"
176 using namespace InnerObjectFormatsUnitTestDetail;
181 for (
auto const& test : testArray)
187 Throw<std::runtime_error> (
188 "Internal InnerObjectFormatsParsedJSON error. Bad JSON.");
191 bool const noObj = parsed.
object == boost::none;
192 if ( noObj == test.expectFail )
198 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.
bool contains_error(Json::Value const &json)
Returns true if the json contains an rpc error specification.
boost::optional< STObject > object
The STObject if the parse was successful.
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.