diff options
author | ipknHama <ipknhama@gmail.com> | 2014-04-20 05:41:53 +0900 |
---|---|---|
committer | ipknHama <ipknhama@gmail.com> | 2014-04-20 17:45:59 +0900 |
commit | 5cdffdf9f75997bfa821203123305b9f8c24b463 (patch) | |
tree | b09e33d3888cebadda2e33d4c3b7813a2165b1d5 /unittest.cpp | |
parent | c6656ab314e0cef54f47c4fa3af342bd6564535a (diff) | |
download | crow-5cdffdf9f75997bfa821203123305b9f8c24b463.tar.gz crow-5cdffdf9f75997bfa821203123305b9f8c24b463.zip |
update json interface
Diffstat (limited to 'unittest.cpp')
-rw-r--r-- | unittest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unittest.cpp b/unittest.cpp index cf9db14..5f90551 100644 --- a/unittest.cpp +++ b/unittest.cpp @@ -252,12 +252,12 @@ TEST(multi_server) TEST(json_read) { { - auto x = json::load_copy("{} 3"); + auto x = json::load("{} 3"); if (x) fail("should fail to parse"); } - auto x = json::load_copy(R"({"message":"hello, world"})"); + auto x = json::load(R"({"message":"hello, world"})"); if (!x) fail("fail to parse"); ASSERT_EQUAL("hello, world", x["message"]); @@ -268,7 +268,7 @@ TEST(json_read) ASSERT_THROW(x["message"].size()); std::string s = R"({"int":3, "ints" :[1,2,3,4,5] })"; - auto y = json::load_nocopy(s); + auto y = json::load(s); ASSERT_EQUAL(3, y["int"]); ASSERT_EQUAL(5, y["ints"].size()); ASSERT_EQUAL(1, y["ints"][0]); |