Skip to content

Commit ba66f8e

Browse files
macOS bug fixed
1 parent bf765ab commit ba66f8e

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

src/sjv/sjv.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77

88
namespace sjv
99
{
10-
bool sjv::verify_json(const json &input, const json &rules)
10+
bool SJV::verify_json(const json &input, const json &rules)
1111
{
1212
log.clear();
1313
return verify_json("/", input, rules);
1414
}
1515

16-
bool sjv::verify_json(const string &pointer, const json &input, const json &rules)
16+
bool SJV::verify_json(const string &pointer, const json &input, const json &rules)
1717
{
1818
// Polymorphism on list, a single item or a list are indistinguishable
1919
// All the elements in the list must pass the test
@@ -79,7 +79,7 @@ namespace sjv
7979
// If they all pass, return true
8080
return true;
8181
};
82-
bool sjv::verify_rule(const json &input, const json &rule)
82+
bool SJV::verify_rule(const json &input, const json &rule)
8383
{
8484
string type = rule.at("type");
8585
if (type == "skip_check")
@@ -104,7 +104,7 @@ namespace sjv
104104
return false;
105105
}
106106
};
107-
bool sjv::verify_rule_file(const json &input, const json &rule)
107+
bool SJV::verify_rule_file(const json &input, const json &rule)
108108
{
109109
assert(rule.at("type") == "file");
110110

@@ -134,7 +134,7 @@ namespace sjv
134134

135135
return true;
136136
};
137-
bool sjv::verify_rule_folder(const json &input, const json &rule)
137+
bool SJV::verify_rule_folder(const json &input, const json &rule)
138138
{
139139
assert(rule.at("type") == "folder");
140140

@@ -150,7 +150,7 @@ namespace sjv
150150

151151
return true;
152152
};
153-
bool sjv::verify_rule_float(const json &input, const json &rule)
153+
bool SJV::verify_rule_float(const json &input, const json &rule)
154154
{
155155
assert(rule.at("type") == "float");
156156

@@ -165,7 +165,7 @@ namespace sjv
165165

166166
return true;
167167
};
168-
bool sjv::verify_rule_int(const json &input, const json &rule)
168+
bool SJV::verify_rule_int(const json &input, const json &rule)
169169
{
170170
assert(rule.at("type") == "int");
171171

@@ -180,7 +180,7 @@ namespace sjv
180180

181181
return true;
182182
};
183-
bool sjv::verify_rule_string(const json &input, const json &rule)
183+
bool SJV::verify_rule_string(const json &input, const json &rule)
184184
{
185185
assert(rule.at("type") == "string");
186186

@@ -199,7 +199,7 @@ namespace sjv
199199

200200
return true;
201201
};
202-
bool sjv::verify_rule_object(const json &input, const json &rule)
202+
bool SJV::verify_rule_object(const json &input, const json &rule)
203203
{
204204
assert(rule.at("type") == "object");
205205

@@ -213,7 +213,7 @@ namespace sjv
213213

214214
return true;
215215
};
216-
bool sjv::verify_rule_bool(const json &input, const json &rule)
216+
bool SJV::verify_rule_bool(const json &input, const json &rule)
217217
{
218218
assert(rule.at("type") == "bool");
219219

@@ -223,7 +223,7 @@ namespace sjv
223223
return true;
224224
};
225225

226-
std::string sjv::log2str()
226+
std::string SJV::log2str()
227227
{
228228
std::stringstream s;
229229

src/sjv/sjv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ using string = std::string;
99

1010
namespace sjv
1111
{
12-
class sjv
12+
class SJV
1313
{
1414
public:
1515
// verify the input json against the set of rules in specs

tests/test_validator.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ TEST_CASE("single_rule", "[validator]")
2626
]
2727
)"_json;
2828

29-
sjv::sjv sjv;
29+
sjv::SJV sjv;
3030

3131
REQUIRE(sjv.verify_json(input,rules));
3232

@@ -52,7 +52,7 @@ TEST_CASE("only_one_rule_can_be_valid", "[validator]")
5252
]
5353
)"_json;
5454

55-
sjv::sjv sjv;
55+
sjv::SJV sjv;
5656

5757
REQUIRE(!sjv.verify_json(input,rules));
5858
}
@@ -79,7 +79,7 @@ TEST_CASE("min_bound_numeric", "[validator]")
7979
]
8080
)"_json;
8181

82-
sjv::sjv sjv;
82+
sjv::SJV sjv;
8383

8484
REQUIRE(sjv.verify_json(input,rules));
8585

@@ -110,7 +110,7 @@ TEST_CASE("file_type", "[validator]")
110110
]
111111
)"_json;
112112

113-
sjv::sjv sjv;
113+
sjv::SJV sjv;
114114
sjv.cwd = std::filesystem::current_path();
115115

116116
REQUIRE(!sjv.verify_json(input,rules));
@@ -146,7 +146,7 @@ TEST_CASE("type_string", "[validator]")
146146
]
147147
)"_json;
148148

149-
sjv::sjv sjv;
149+
sjv::SJV sjv;
150150

151151
REQUIRE(sjv.verify_json(input,rules));
152152

@@ -178,7 +178,7 @@ TEST_CASE("type_object", "[validator]")
178178
]
179179
)"_json;
180180

181-
sjv::sjv sjv;
181+
sjv::SJV sjv;
182182

183183
sjv.strict = true;
184184
REQUIRE(!sjv.verify_json(input,rules));
@@ -199,7 +199,7 @@ TEST_CASE("file_01", "[validator]")
199199
std::ifstream ifs2("../data/rules_01.json");
200200
json rules = json::parse(ifs2);
201201

202-
sjv::sjv sjv;
202+
sjv::SJV sjv;
203203

204204
sjv.strict = true;
205205

0 commit comments

Comments
 (0)