diff --git a/Makefile b/Makefile index 740742091..b0a054904 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ clean: # build unit tests json_unit: test/unit.cpp src/json.hpp test/catch.hpp - $(CXX) -std=c++11 $(CXXFLAGS) $(FLAGS) $(CPPFLAGS) -I src -I test -Dprivate=public $< $(LDFLAGS) -o $@ + $(CXX) -std=c++11 $(CXXFLAGS) $(FLAGS) $(CPPFLAGS) -I src -I test $< $(LDFLAGS) -o $@ # create scanner with re2c re2c: src/json.hpp.re2c diff --git a/test/unit.cpp b/test/unit.cpp index d6b2b4203..92360fb5d 100644 --- a/test/unit.cpp +++ b/test/unit.cpp @@ -10,9 +10,6 @@ #define CATCH_CONFIG_MAIN #include "catch.hpp" -#include "json.hpp" -using nlohmann::json; - #include #include #include @@ -24,6 +21,10 @@ using nlohmann::json; #include #include +#define private public +#include "json.hpp" +using nlohmann::json; + TEST_CASE("constructors") { SECTION("create an empty value with a given type")