diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-14 21:45:11 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-14 21:45:11 +1000 |
commit | 9d66acde2ae6896607da953e20ba5bbfc23948f6 (patch) | |
tree | 29ac5b2f0aa6e877ab4f28cda09ea3db30549cda /source/test/lua_json_test.cpp | |
parent | 49afa899a8169bcde3eecffe9944d096ffcd7d2e (diff) |
Update gtests
Diffstat (limited to 'source/test/lua_json_test.cpp')
-rw-r--r-- | source/test/lua_json_test.cpp | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/source/test/lua_json_test.cpp b/source/test/lua_json_test.cpp index 5f6b56c..5acd449 100644 --- a/source/test/lua_json_test.cpp +++ b/source/test/lua_json_test.cpp @@ -358,22 +358,15 @@ TEST(LuaJsonTest, CustomArrayType2) { function arrayLogic2() l = {} - l["1"] = "foo" - l["2"] = "bar" + l[1] = "foo" + l[2.1] = "bar" return l end function arrayLogic3() - l = {} - l["1"] = "foo" - l["2.1"] = "bar" - return l - end - - function arrayLogic4() l = jarray() - l["1"] = "foo" - l["2"] = "bar" + l[1] = "foo" + l[2] = "bar" return l end )SCRIPT"); @@ -387,15 +380,11 @@ TEST(LuaJsonTest, CustomArrayType2) { EXPECT_EQ(arrayTest1, arrayComp1); Json arrayTest2 = context.invokePath<Json>("arrayLogic2"); - Json arrayComp2 = JsonArray{"foo", "bar"}; + Json arrayComp2 = JsonObject{{"1", "foo"}, {"2.1", "bar"}}; EXPECT_EQ(arrayTest2, arrayComp2); Json arrayTest3 = context.invokePath<Json>("arrayLogic3"); - Json arrayComp3 = JsonObject{{"1", "foo"}, {"2.1", "bar"}}; - EXPECT_EQ(arrayTest2, arrayComp2); - - Json arrayTest4 = context.invokePath<Json>("arrayLogic4"); - Json arrayComp4 = JsonArray{"foo", "bar"}; + Json arrayComp3 = JsonArray{"foo", "bar"}; EXPECT_EQ(arrayTest3, arrayComp3); } |