mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:37:46 +00:00
AK: Add test case for duplicate JsonObject keys
This commit is contained in:
parent
f649009887
commit
62ea2c5437
1 changed files with 13 additions and 4 deletions
|
@ -136,4 +136,13 @@ TEST_CASE(json_64_bit_value)
|
||||||
EXPECT_EQ(big_json_value.as_u64(), big_json_value_copy.as_u64());
|
EXPECT_EQ(big_json_value.as_u64(), big_json_value_copy.as_u64());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_CASE(json_duplicate_keys)
|
||||||
|
{
|
||||||
|
JsonObject json;
|
||||||
|
json.set("test", "foo");
|
||||||
|
json.set("test", "bar");
|
||||||
|
json.set("test", "baz");
|
||||||
|
EXPECT_EQ(json.to_string(), "{\"test\":\"baz\"}");
|
||||||
|
}
|
||||||
|
|
||||||
TEST_MAIN(JSON)
|
TEST_MAIN(JSON)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue