17#define BOOST_CHECK(expr) assert(expr)
18#define BOOST_CHECK_EQUAL(v1, v2) assert((v1) == (v2))
19#define BOOST_CHECK_THROW(stmt, excMatch) \
23 assert(0 && "No exception caught"); \
24 } catch (excMatch & e) { \
26 assert(0 && "Wrong exception caught"); \
29#define BOOST_CHECK_NO_THROW(stmt) \
74 std::string
vs(
"yawn");
79 const char *
vcs =
"zappa";
115 v3.setNumStr(
"1000");
134 std::vector<UniValue>
vals =
v5.getValues();
163 std::string_view
sv{
"ab\0c", 4};
215 std::string
vStr(
"zippy");
218 const char *s =
"pippy";
221 std::vector<UniValue>
vec;
232 arr.push_back(
int{-401});
233 arr.push_back(-40.1);
283 const char *
cVal =
"Smith";
305 obj2.pushKV(
"cat1", 9000);
306 obj2.pushKV(
"cat2", 12345);
341 std::map<std::string, UniValue::VType>
objTypes;
366 obj.pushKVEnd(
"age",
uv);
371 obj.pushKV(
"age",
uv);
375 obj.pushKV(
"name",
"foo bar");
377 std::map<std::string, UniValue>
kv;
383static const char *
json1 =
"[1.10000000,{\"key1\":\"str\\u0000\",\"key2\":800,"
384 "\"key3\":{\"name\":\"martian http://test.com\"}}]";
const std::string & get_str() const
enum VType getType() const
std::string write(unsigned int prettyIndent=0, unsigned int indentLevel=0) const
const std::string & getValStr() const
const UniValue & get_obj() const
const std::vector< UniValue > & getValues() const
const std::vector< std::string > & getKeys() const
void setInt(uint64_t val)
bool read(std::string_view raw)
const UniValue & get_array() const
void setFloat(double val)
void setStr(std::string str)
void setNumStr(std::string str)
#define BOOST_CHECK_THROW(stmt, excMatch)
static const char * json1
void univalue_readwrite()
#define BOOST_CHECK_EQUAL(v1, v2)
#define BOOST_CHECK_NO_THROW(stmt)
void univalue_typecheck()
#define BOOST_CHECK(expr)
void univalue_constructor()
void univalue_push_throw()
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...