From 1923067982e2ba28bfd0bc60c746359d61351d7d Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Thu, 22 Oct 2020 22:38:56 +0900 Subject: [PATCH] Fix build when using RapidJSON backend. --- tests/tester.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/tester.cc b/tests/tester.cc index bc5f819..e0a174b 100644 --- a/tests/tester.cc +++ b/tests/tester.cc @@ -3,6 +3,9 @@ #define STB_IMAGE_WRITE_IMPLEMENTATION #include "tiny_gltf.h" +// Nlohmann json(include ../json.hpp) +#include "json.hpp" + #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file #include "catch.hpp" @@ -425,8 +428,8 @@ TEST_CASE("serialize-empty-material", "[issue-294]") { tinygltf::TinyGLTF ctx; ctx.WriteGltfSceneToStream(&m, os, false, false); - // use nlohmann json(included inside of tiny_gltf.h) - json j = json::parse(os.str()); + // use nlohmann json + nlohmann::json j = nlohmann::json::parse(os.str()); REQUIRE(1 == j["materials"].size()); REQUIRE(j["asset"].is_null());