|
|
@@ -52,7 +52,7 @@ struct RecursiveTestFilter {
|
|
|
|
|
|
bool accepts(std::string const & str) const {
|
|
|
return std::count(blacklist.begin(), blacklist.end(), str) == 0 and
|
|
|
- (whitelist.empty() or std::count(whitelist.begin(), whitelist.end(), str) > 0);
|
|
|
+ (whitelist.empty() or std::count(whitelist.begin(), whitelist.end(), str) > 0);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -124,7 +124,7 @@ protected:
|
|
|
tokens[i - 1] += tokens[i];
|
|
|
tokens.erase(tokens.begin() + i);
|
|
|
}
|
|
|
- for (auto &tok : tokens) {
|
|
|
+ for (auto & tok : tokens) {
|
|
|
into.emplace_back(tok);
|
|
|
}
|
|
|
};
|
|
|
@@ -164,6 +164,7 @@ TEST_P(JsonSchema, TestSuite) {
|
|
|
|
|
|
EXPECT_TRUE(load_file(file, spec));
|
|
|
|
|
|
+ bool is_format = file.string().find("optional/format") != std::string::npos;
|
|
|
for (auto const & suite : spec) {
|
|
|
if (skip_suite(suite["description"].asString())) {
|
|
|
continue;
|
|
|
@@ -178,7 +179,7 @@ TEST_P(JsonSchema, TestSuite) {
|
|
|
try {
|
|
|
std::cout << "\033[0;32m[ CASE ] \033[0;0m " << test["description"].asString()
|
|
|
<< std::endl;
|
|
|
- EXPECT_THAT(test["data"], ValidatesAgainst(schema, test)) << suite["schema"];
|
|
|
+ EXPECT_THAT(test["data"], ValidatesAgainst(schema, test, is_format)) << suite["schema"];
|
|
|
} catch (std::exception const & ex) { ADD_FAILURE() << ex.what() << "\n" << test; }
|
|
|
}
|
|
|
} catch (std::exception const & ex) {
|