Skip to content

Commit

Permalink
Merge pull request #407 from DavidSM64/release
Browse files Browse the repository at this point in the history
Added detail namespace to prevent json namespace conflicts
  • Loading branch information
syoyo authored Feb 18, 2023
2 parents 6dba104 + 03ad33c commit 84a83d3
Show file tree
Hide file tree
Showing 2 changed files with 683 additions and 681 deletions.
14 changes: 7 additions & 7 deletions tests/tester.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
#include <sstream>
#include <fstream>

static JsonDocument JsonConstruct(const char* str)
static tinygltf::detail::JsonDocument JsonConstruct(const char* str)
{
JsonDocument doc;
JsonParse(doc, str, strlen(str));
tinygltf::detail::JsonDocument doc;
tinygltf::detail::JsonParse(doc, str, strlen(str));
return doc;
}

Expand Down Expand Up @@ -275,9 +275,9 @@ TEST_CASE("parse-integer", "[bounds-checking]") {

err.clear();
{
JsonDocument o;
tinygltf::detail::JsonDocument o;
double nan = std::numeric_limits<double>::quiet_NaN();
tinygltf::JsonAddMember(o, "int", json(nan));
tinygltf::detail::JsonAddMember(o, "int", tinygltf::detail::json(nan));
CHECK_FALSE(tinygltf::ParseIntegerProperty(
&result, &err, o,
"int", true));
Expand Down Expand Up @@ -321,9 +321,9 @@ TEST_CASE("parse-unsigned", "[bounds-checking]") {

err.clear();
{
JsonDocument o;
tinygltf::detail::JsonDocument o;
double nan = std::numeric_limits<double>::quiet_NaN();
tinygltf::JsonAddMember(o, "int", json(nan));
tinygltf::detail::JsonAddMember(o, "int", tinygltf::detail::json(nan));
CHECK_FALSE(tinygltf::ParseUnsignedProperty(
&result, &err, o,
"int", true));
Expand Down
Loading

0 comments on commit 84a83d3

Please sign in to comment.