From 6894976f317b49eaf42d3a3cddc65dc79ee083fd Mon Sep 17 00:00:00 2001 From: Patrick Boettcher Date: Fri, 10 Dec 2021 16:26:35 +0100 Subject: [PATCH] deeper test $refs with default-values --- test/issue-189-default-values.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/issue-189-default-values.cpp b/test/issue-189-default-values.cpp index 606e953..d0b32ad 100644 --- a/test/issue-189-default-values.cpp +++ b/test/issue-189-default-values.cpp @@ -18,7 +18,10 @@ static const json quad_schema = R"( }, "depth": { "$ref": "default_schema#/definitions/defaultLength" - } + }, + "time": { + "$ref": "#/properties/width" + } }, "definitions": { "length": { @@ -56,7 +59,7 @@ int main(void) const auto actual = empty_rectangle.patch(default_patch); // height must be 10 according to the default specified in the length definition while width must be 10 overridden by the width element - const auto expected = R"({"height":10,"width":20,"depth":5})"_json; + const auto expected = R"({"height":10,"width":20,"depth":5,"time":20})"_json; if (actual != expected) { std::cerr << "Patch with defaults contains wrong value: '" << actual << "' instead of expected '" << expected.dump() << "'" << std::endl; return 1;