From 1254ceaa42c7ffc74347cbecef05934c86e14d0d Mon Sep 17 00:00:00 2001 From: Daniel Sipka Date: Fri, 16 Oct 2015 17:17:07 +0200 Subject: [PATCH] fix for libc++ --- test/test_main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/test_main.cpp b/test/test_main.cpp index be0f2b6..a52fe3c 100644 --- a/test/test_main.cpp +++ b/test/test_main.cpp @@ -73,13 +73,16 @@ mstch::node parse_with_rapidjson(const std::string& str) { if (test.count("partials")) \ for (auto& partial_item: get(test["partials"])) \ partials.insert(std::make_pair(partial_item.first, get(partial_item.second))); \ + mstch::map context; \ for (auto& data_item: get(test["data"])) \ if (data_item.first == "lambda") \ - data_item.second = specs_lambdas[get(test["name"])]; \ + context.insert(std::make_pair(data_item.first, specs_lambdas[get(test["name"])])); \ + else \ + context.insert(data_item); \ SECTION(get(test["name"])) \ REQUIRE(mstch::render( \ get(test["template"]), \ - test["data"], partials) == \ + context, partials) == \ get(test["expected"])); \ } \ }