Skip to content

Commit ce7ffb7

Browse files
committed
tidy up
1 parent e5db8d6 commit ce7ffb7

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
# JSON Path Reference Implementation
2+
3+
See [cts.yaml](tests/cts.yaml) for the Compliance Test Suite and [grammar.pest](src/grammar.pest) for the Parsing Expression Grammar of the Reference Implementation.

tests/cts.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ mod tests {
1111
use std::fs;
1212
use std::panic;
1313

14+
const VERBOSE: bool = false;
15+
1416
#[derive(Debug, PartialEq, Serialize, Deserialize)]
1517
struct TestSuite {
1618
tests: Vec<Testcase>,
@@ -33,13 +35,15 @@ mod tests {
3335
let mut errors: Vec<String> = Vec::new();
3436
for t in suite.tests {
3537
let result = panic::catch_unwind(|| {
36-
println!(
37-
"name = {}, selector = {}, document = {}, result = {}",
38-
t.name,
39-
t.selector,
40-
as_json(&t.document).expect("invalid document"),
41-
as_json(&t.result).expect("invalid result")
42-
);
38+
if VERBOSE {
39+
println!(
40+
"name = {}, selector = {}, document = {}, result = {}",
41+
t.name,
42+
t.selector,
43+
as_json(&t.document).expect("invalid document"),
44+
as_json(&t.result).expect("invalid result")
45+
);
46+
}
4347
let path = jsonpath::parse(&t.selector);
4448
assert!(
4549
path.is_ok(),

0 commit comments

Comments
 (0)