Skip to content

Commit

Permalink
added multiple keys test for #11
Browse files Browse the repository at this point in the history
  • Loading branch information
madeso committed Jun 2, 2019
1 parent 4bc8c55 commit e82ff12
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ set(tests_src
tests_jsonh.cc
tests_spec.cc
tests_utf8.cc
tests_dup.cc
tests_print.cc
tests_roundtrip.cc
tests_osx.cc
Expand Down
14 changes: 14 additions & 0 deletions tests_dup.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "catch.hpp"
#include "jsonh.h"

TEST_CASE("dup", "[dup]")
{
const std::string src = R"(
{
"a": 4, "a": 3
}
)";
auto j1 = Parse(src, ParseFlags::Json);
REQUIRE_FALSE(j1);
}

0 comments on commit e82ff12

Please sign in to comment.