 |
Bitcoin Core
23.99.0
P2P Digital Currency
|
Go to the documentation of this file.
16 #define BOOST_FIXTURE_TEST_SUITE(a, b)
17 #define BOOST_AUTO_TEST_CASE(funcName) void funcName()
18 #define BOOST_AUTO_TEST_SUITE_END()
19 #define BOOST_CHECK(expr) assert(expr)
20 #define BOOST_CHECK_EQUAL(v1, v2) assert((v1) == (v2))
21 #define BOOST_CHECK_THROW(stmt, excMatch) { \
24 assert(0 && "No exception caught"); \
25 } catch (excMatch & e) { \
27 assert(0 && "Wrong exception caught"); \
30 #define BOOST_CHECK_NO_THROW(stmt) { \
77 std::string vs(
"yawn");
82 const char *vcs =
"zappa";
122 std::vector<UniValue> vals = v5.
getValues();
196 std::string vStr(
"zippy");
199 const char *s =
"pippy";
202 std::vector<UniValue> vec;
251 std::string strKey, strVal;
263 const char *cVal =
"Smith";
275 strKey =
"temperature";
321 std::map<std::string, UniValue::VType> objTypes;
355 obj.
pushKV(
"name",
"foo bar");
357 std::map<std::string,UniValue> kv;
365 "[1.10000000,{\"key1\":\"str\\u0000\",\"key2\":800,\"key3\":{\"name\":\"martian http://test.com\"}}]";
372 std::string strJson1(
json1);
385 std::string correctValue(
"str");
386 correctValue.push_back(
'\0');
412 int
main (
int argc,
char *argv[])
414 univalue_constructor();
415 univalue_typecheck();
419 univalue_readwrite();
bool read(const char *raw, size_t len)
std::string write(unsigned int prettyIndent=0, unsigned int indentLevel=0) const
enum VType getType() const
#define BOOST_FIXTURE_TEST_SUITE(a, b)
bool pushKV(const std::string &key, const UniValue &val)
bool checkObject(const std::map< std::string, UniValue::VType > &memberTypes) const
const std::string & get_str() const
const UniValue & get_obj() const
bool pushKVs(const UniValue &obj)
bool setInt(uint64_t val)
static const char * json1
bool exists(const std::string &key) const
bool push_backV(const std::vector< UniValue > &vec)
#define BOOST_CHECK_NO_THROW(stmt)
#define BOOST_AUTO_TEST_CASE(funcName)
void __pushKV(const std::string &key, const UniValue &val)
const std::vector< std::string > & getKeys() const
void getObjMap(std::map< std::string, UniValue > &kv) const
const std::string & getValStr() const
bool setNumStr(const std::string &val)
bool push_back(const UniValue &val)
const std::vector< UniValue > & getValues() const
#define BOOST_CHECK_THROW(stmt, excMatch)
int main(int argc, char *argv[])
const UniValue & get_array() const
bool setFloat(double val)
bool setStr(const std::string &val)
#define BOOST_CHECK(expr)
#define BOOST_AUTO_TEST_SUITE_END()
#define BOOST_CHECK_EQUAL(v1, v2)