()
| 186 | |
| 187 | #[test] |
| 188 | fn errors_are_not_vacuous_conformance() { |
| 189 | for turtle in [ |
| 190 | "<urn:bad> a sh:NodeShape ; sh:targetClass atomic:Change ; sh:property [ sh:path atomic:implements ; sh:minCount \"one\" ] .", |
| 191 | "<urn:bad> a sh:NodeShape ; sh:js [ sh:jsFunctionName \"validate\" ] .", |
| 192 | "<urn:bad> a sh:NodeShape ; sh:sparql [ sh:select \"SELECT $this WHERE {{\" ] .", |
| 193 | "<urn:enterprise:shapes> <http://www.w3.org/2002/07/owl#imports> <https://example.invalid/remote.ttl> .", |
| 194 | ] { assert!(validate_ntriples("", "empty", &custom(turtle)).is_err(), "accepted {turtle}"); } |
| 195 | let report = validate_ntriples("", "empty", &Default::default()).unwrap(); |
| 196 | assert!(report.conforms); |
| 197 | assert!(report |
| 198 | .target_coverage |
| 199 | .iter() |
| 200 | .all(|coverage| coverage.evaluated == 0)); |
| 201 | assert!(report |
| 202 | .diagnostics |
| 203 | .iter() |
| 204 | .any(|message| message.contains("vacuous"))); |
| 205 | } |
| 206 | |
| 207 | #[test] |
| 208 | fn custom_shapes_preserve_nested_paths_and_standard_report_fields() { |
nothing calls this directly
no test coverage detected