1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-25 13:41:56 +03:00

more tests for meta() call

This commit is contained in:
Niels Lohmann
2017-02-26 14:34:58 +01:00
parent d1b30250d6
commit bf4d744d1a

View File

@ -33,10 +33,14 @@ using nlohmann::json;
TEST_CASE("version information")
{
SECTION("version()")
SECTION("meta()")
{
CHECK(json::meta()["name"] == "JSON for Modern C++");
CHECK(json::meta()["version"] == json(
json j = json::meta();
CHECK(j["name"] == "JSON for Modern C++");
CHECK(j["copyright"] == "(C) 2013-2017 Niels Lohmann");
CHECK(j["url"] == "https://github.com/nlohmann/json");
CHECK(j["version"] == json(
{
{"string", "2.1.1"},
{"major", 2},