14 #define BOOST_FIXTURE_TEST_SUITE(a, b) 15 #define BOOST_AUTO_TEST_CASE(funcName) void funcName() 16 #define BOOST_AUTO_TEST_SUITE_END() 17 #define BOOST_CHECK(expr) assert(expr) 18 #define BOOST_CHECK_EQUAL(v1, v2) assert((v1) == (v2)) 19 #define BOOST_CHECK_THROW(stmt, excMatch) { \ 22 assert(0 && "No exception caught"); \ 23 } catch (excMatch & e) { \ 25 assert(0 && "Wrong exception caught"); \ 28 #define BOOST_CHECK_NO_THROW(stmt) { \ 75 std::string vs(
"yawn");
80 const char *vcs =
"zappa";
120 std::vector<UniValue> vals = v5.getValues();
194 std::string vStr(
"zippy");
197 const char *s =
"pippy";
200 std::vector<UniValue> vec;
237 std::string strKey, strVal;
249 const char *cVal =
"Smith";
261 strKey =
"temperature";
297 std::map<std::string, UniValue::VType> objTypes;
329 obj.
pushKV(
"name",
"foo bar");
331 std::map<std::string,UniValue> kv;
338 static const char *json1 =
339 "[1.10000000,{\"key1\":\"str\\u0000\",\"key2\":800,\"key3\":{\"name\":\"martian http://test.com\"}}]";
346 std::string strJson1(json1);
359 std::string correctValue(
"str");
360 correctValue.push_back(
'\0');
386 int
main (
int argc,
char *argv[])
388 univalue_constructor();
389 univalue_typecheck();
393 univalue_readwrite();
bool setNumStr(const std::string &val)
#define BOOST_CHECK_THROW(stmt, excMatch)
int main(int argc, char *argv[])
#define BOOST_AUTO_TEST_CASE(funcName)
bool read(const char *raw, size_t len)
void getObjMap(std::map< std::string, UniValue > &kv) const
bool pushKVs(const UniValue &obj)
enum VType getType() const
bool push_back(const UniValue &val)
bool setFloat(double val)
bool pushKV(const std::string &key, const UniValue &val)
bool setStr(const std::string &val)
bool setInt(uint64_t val)
const std::string & getValStr() const
#define BOOST_FIXTURE_TEST_SUITE(a, b)
#define BOOST_CHECK_EQUAL(v1, v2)
bool push_backV(const std::vector< UniValue > &vec)
#define BOOST_AUTO_TEST_SUITE_END()
#define BOOST_CHECK_NO_THROW(stmt)
bool checkObject(const std::map< std::string, UniValue::VType > &memberTypes) const
bool exists(const std::string &key) const
void __pushKV(const std::string &key, const UniValue &val)
std::string write(unsigned int prettyIndent=0, unsigned int indentLevel=0) const
#define BOOST_CHECK(expr)