MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / errors_are_not_vacuous_conformance

Function errors_are_not_vacuous_conformance

atomic-shacl/tests/profiles.rs:188–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186
187#[test]
188fn 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]
208fn custom_shapes_preserve_nested_paths_and_standard_report_fields() {

Callers

nothing calls this directly

Calls 2

validate_ntriplesFunction · 0.85
unwrapMethod · 0.45

Tested by

no test coverage detected