Module: sems Branch: master Commit: a1d2b581c44c8d78a4c85fcb345e53fcd2660e38 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=a1d2b581c44c8d78a4c85fcb345e53fcd2660e38
Author: Stefan Sayer <[email protected]> Committer: Stefan Sayer <[email protected]> Date: Fri Jul 16 02:20:17 2010 +0200 json: to and back conversion test --- core/tests/test_jsonarg.cpp | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/core/tests/test_jsonarg.cpp b/core/tests/test_jsonarg.cpp index 2e25db8..aa889fc 100644 --- a/core/tests/test_jsonarg.cpp +++ b/core/tests/test_jsonarg.cpp @@ -102,4 +102,18 @@ FCTMF_SUITE_BGN(test_jsonarg) { fct_chk(isArgDouble(rpc_params["result"]) && rpc_params["result"].asDouble() == 1.21); } FCT_TEST_END(); + FCT_TEST_BGN(json_tofro_equality) { + AmArg a1; + a1["test"]=1; + a1["test2"].push("asdf"); + a1["test2"].push(1); + + string s = arg2json(a1); + AmArg a2; + bool back_conversion_result = json2arg(s, a2); + fct_chk(back_conversion_result); + // fct_chk(a1==a2); + // DBG("a1 = '%s', a2 = '%s', \n", AmArg::print(a1).c_str(), AmArg::print(a2).c_str()); + } FCT_TEST_END(); + } FCTMF_SUITE_END(); _______________________________________________ Semsdev mailing list [email protected] http://lists.iptel.org/mailman/listinfo/semsdev
