Commit 33b5c59e authored by miloyip's avatar miloyip

Fix some gcc warnings/errors

parent 9a5283eb
......@@ -18,6 +18,12 @@
#include "document.h"
#include <cmath> // HUGE_VAL, fmod
#if defined(__GNUC__)
RAPIDJSON_DIAG_PUSH
RAPIDJSON_DIAG_OFF(effc++)
RAPIDJSON_DIAG_OFF(float-equal)
#endif
RAPIDJSON_NAMESPACE_BEGIN
template <typename Encoding>
......@@ -862,4 +868,8 @@ typedef GenericSchemaValidator<UTF8<> > SchemaValidator;
RAPIDJSON_NAMESPACE_END
#if defined(__GNUC__)
RAPIDJSON_DIAG_POP
#endif
#endif // RAPIDJSON_SCHEMA_H_
......@@ -26,7 +26,10 @@ using namespace rapidjson;
Document d;\
d.Parse(json);\
EXPECT_FALSE(d.HasParseError());\
EXPECT_EQ(expected, d.Accept(validator));\
if (expected)\
EXPECT_TRUE(d.Accept(validator));\
else\
EXPECT_FALSE(d.Accept(validator));\
}
TEST(SchemaValidator, Typeless) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment