mirror of
https://github.com/tristanpenman/valijson.git
synced 2024-12-12 18:20:27 +01:00
Disable json11 unless VALIJSON_BUILD_CXX11_ADAPTERS macro is defined.
This commit is contained in:
parent
67e93e21ae
commit
303332a209
@ -9,12 +9,15 @@
|
||||
#include <valijson/adapters/property_tree_adapter.hpp>
|
||||
#include <valijson/adapters/rapidjson_adapter.hpp>
|
||||
#include <valijson/adapters/picojson_adapter.hpp>
|
||||
#include <valijson/adapters/json11_adapter.hpp>
|
||||
#include <valijson/utils/jsoncpp_utils.hpp>
|
||||
#include <valijson/utils/property_tree_utils.hpp>
|
||||
#include <valijson/utils/rapidjson_utils.hpp>
|
||||
#include <valijson/utils/picojson_utils.hpp>
|
||||
|
||||
#ifdef VALIJSON_BUILD_CXX11_ADAPTERS
|
||||
#include <valijson/adapters/json11_adapter.hpp>
|
||||
#include <valijson/utils/json11_utils.hpp>
|
||||
#endif // VALIJSON_BUILD_CXX11_ADAPTERS
|
||||
|
||||
#define TEST_DATA_DIR "../tests/data/documents/"
|
||||
|
||||
@ -157,13 +160,6 @@ TEST_F(TestAdapterComparison, JsonCppVsRapidJsonCrtAlloc)
|
||||
rapidjson::CrtAllocator> > >();
|
||||
}
|
||||
|
||||
TEST_F(TestAdapterComparison, JsonCppVsJson11)
|
||||
{
|
||||
testComparison<
|
||||
valijson::adapters::JsonCppAdapter,
|
||||
valijson::adapters::Json11Adapter>();
|
||||
}
|
||||
|
||||
TEST_F(TestAdapterComparison, PropertyTreeVsPicoJson)
|
||||
{
|
||||
testComparison<
|
||||
@ -244,6 +240,8 @@ TEST_F(TestAdapterComparison, RapidJsonCrtAllocVsRapidJsonCrtAlloc)
|
||||
rapidjson::CrtAllocator> > >();
|
||||
}
|
||||
|
||||
#ifdef VALIJSON_BUILD_CXX11_ADAPTERS
|
||||
|
||||
TEST_F(TestAdapterComparison, Json11VsJson11)
|
||||
{
|
||||
testComparison<
|
||||
@ -251,6 +249,14 @@ TEST_F(TestAdapterComparison, Json11VsJson11)
|
||||
valijson::adapters::Json11Adapter>();
|
||||
}
|
||||
|
||||
TEST_F(TestAdapterComparison, Json11VsJsonCpp)
|
||||
{
|
||||
testComparison<
|
||||
valijson::adapters::Json11Adapter,
|
||||
valijson::adapters::JsonCppAdapter>();
|
||||
}
|
||||
|
||||
|
||||
TEST_F(TestAdapterComparison, Json11VsRapidJson)
|
||||
{
|
||||
testComparison<
|
||||
@ -280,3 +286,6 @@ TEST_F(TestAdapterComparison, Json11VsPropertyTree)
|
||||
valijson::adapters::Json11Adapter,
|
||||
valijson::adapters::PropertyTreeAdapter>();
|
||||
}
|
||||
|
||||
#endif // VALIJSON_BUILD_CXX11_ADAPTERS
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#ifdef VALIJSON_BUILD_CXX11_ADAPTERS
|
||||
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
@ -83,3 +85,6 @@ TEST_F(TestJson11Adapter, BasicObjectIteration)
|
||||
// Ensure that the correct number of elements were iterated over
|
||||
EXPECT_EQ( numElements, expectedValue );
|
||||
}
|
||||
|
||||
#endif // VALIJSON_BUILD_CXX11_ADAPTERS
|
||||
|
||||
|
@ -10,16 +10,19 @@
|
||||
#include <valijson/adapters/jsoncpp_adapter.hpp>
|
||||
#include <valijson/adapters/rapidjson_adapter.hpp>
|
||||
#include <valijson/adapters/picojson_adapter.hpp>
|
||||
#include <valijson/adapters/json11_adapter.hpp>
|
||||
#include <valijson/utils/jsoncpp_utils.hpp>
|
||||
#include <valijson/utils/rapidjson_utils.hpp>
|
||||
#include <valijson/utils/picojson_utils.hpp>
|
||||
#include <valijson/utils/json11_utils.hpp>
|
||||
#include <valijson/schema.hpp>
|
||||
#include <valijson/schema_parser.hpp>
|
||||
#include <valijson/validation_results.hpp>
|
||||
#include <valijson/validator.hpp>
|
||||
|
||||
#ifdef VALIJSON_BUILD_CXX11_ADAPTERS
|
||||
#include <valijson/adapters/json11_adapter.hpp>
|
||||
#include <valijson/utils/json11_utils.hpp>
|
||||
#endif // VALIJSON_BUILD_CXX11_ADAPTERS
|
||||
|
||||
#define TEST_SUITE_DIR "../thirdparty/JSON-Schema-Test-Suite/tests/"
|
||||
|
||||
using valijson::adapters::AdapterTraits;
|
||||
@ -118,7 +121,9 @@ protected:
|
||||
processTestFile<valijson::adapters::JsonCppAdapter>(testFile, version);
|
||||
processTestFile<valijson::adapters::RapidJsonAdapter>(testFile, version);
|
||||
processTestFile<valijson::adapters::PicoJsonAdapter>(testFile, version);
|
||||
#ifdef VALIJSON_BUILD_CXX11_ADAPTERS
|
||||
processTestFile<valijson::adapters::Json11Adapter>(testFile, version);
|
||||
#endif // VALIJSON_BUILD_CXX11_ADAPTERS
|
||||
}
|
||||
|
||||
void processDraft3TestFile(const std::string &testFile)
|
||||
|
Loading…
Reference in New Issue
Block a user