diff options
author | David Robillard <d@drobilla.net> | 2021-03-08 23:25:35 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-03-09 01:43:52 -0500 |
commit | 7b954f5667e82de1b64984a9aeb26b8ebb5cab81 (patch) | |
tree | 5668f80ce2dc7a52cf66bbe2f4e4429b18f09e08 /test | |
parent | c579186c5dd4e11bffddd353cef8978a66ef9c10 (diff) | |
download | serd-7b954f5667e82de1b64984a9aeb26b8ebb5cab81.tar.gz serd-7b954f5667e82de1b64984a9aeb26b8ebb5cab81.tar.bz2 serd-7b954f5667e82de1b64984a9aeb26b8ebb5cab81.zip |
WIP: Validationserd1-meson
Diffstat (limited to 'test')
46 files changed, 528 insertions, 203 deletions
diff --git a/test/meson.build b/test/meson.build index 501f8b13..1b36e695 100644 --- a/test/meson.build +++ b/test/meson.build @@ -127,7 +127,7 @@ if get_option('utils') test('empty', files('test_empty.py'), args: script_args + [serd_ttl], suite: 'output') - + # FIXME: Old base URI argument? # IO errors diff --git a/test/run_validation_test_suite.py b/test/run_validation_test_suite.py index a27e55de..34a213f0 100755 --- a/test/run_validation_test_suite.py +++ b/test/run_validation_test_suite.py @@ -2,12 +2,7 @@ """Run the serd RDF validation test suite.""" -import serd_test_util - import argparse -import datetime -import difflib -import itertools import os import re import shlex @@ -16,11 +11,24 @@ import sys import tempfile import urllib.parse +import serd_test_util + +NS_CHECKS = "http://drobilla.net/ns/serd/checks#" +NS_MF = "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#" +NS_SERD = "http://drobilla.net/ns/serd#" + + +def log_error(message): + """Log an error message to stderr""" + + sys.stderr.write("error: ") + sys.stderr.write(message) + def _uri_path(uri): path = urllib.parse.urlparse(uri).path drive = os.path.splitdrive(path[1:])[0] - return path if not drive else path[1:] + return os.path.realpath(path) if not drive else path[1:] def _load_rdf(filename, base_uri, command_prefix): @@ -54,57 +62,55 @@ def _load_rdf(filename, base_uri, command_prefix): return model, instances -def _option_combinations(options): - """Return an iterator that cycles through all combinations of options.""" - - combinations = [] - for count in range(len(options) + 1): - combinations += list(itertools.combinations(options, count)) - - return itertools.cycle(combinations) +def _run_positive_test(command, out_filename): + command_string = " ".join([shlex.quote(c) for c in command]) + with open(out_filename, "w") as stdout: + proc = subprocess.run(command, check=False, stdout=stdout) + if proc.returncode != 0: + log_error("Unexpected command failure failure\n") + sys.stderr.write(command_string + "\n") + return 1 -def _show_diff(from_lines, to_lines, from_filename, to_filename): - same = True - for line in difflib.unified_diff( - from_lines, - to_lines, - fromfile=os.path.abspath(from_filename), - tofile=os.path.abspath(to_filename), - ): - sys.stderr.write(line) - same = False + return proc.returncode - return same + return 1 -def _file_equals(patha, pathb): +def _run_negative_test(command, check_name, out_filename): + command_string = " ".join([shlex.quote(c) for c in command]) - for path in (patha, pathb): - if not os.access(path, os.F_OK): - sys.stderr.write("error: missing file {}\n".format(path)) - return False - - with open(patha, "r", encoding="utf-8") as fa: - with open(pathb, "r", encoding="utf-8") as fb: - return _show_diff(fa.readlines(), fb.readlines(), patha, pathb) + with open(out_filename, "w") as stdout: + with tempfile.TemporaryFile() as stderr: + proc = subprocess.run( + command, check=False, stdout=stdout, stderr=stderr + ) + # Check that serdi returned with status SERD_ERR_INVALID + if proc.returncode != 16: + log_error("Unexpected status {}\n".format(proc.returncode)) + sys.stderr.write(command_string + "\n") + return 1 -def _file_lines_equal(patha, pathb, subst_from="", subst_to=""): - import io + # Check that an error message was printed + stderr.seek(0, 2) # Seek to end + if stderr.tell() == 0: # Empty + log_error("No error message printed\n") + sys.stderr.write(command_string + "\n") + return 1 - for path in (patha, pathb): - if not os.access(path, os.F_OK): - sys.stderr.write("error: missing file %s\n" % path) - return False + # Check that the expected check printed an error message + stderr.seek(0) # Seek to start + err_output = stderr.read().decode("utf-8") + if check_name and "[{}]".format(check_name) not in err_output: + log_error("Test didn't trigger {}\n".format(check_name)) + sys.stderr.write(command_string + "\n") + sys.stderr.write(err_output + "\n") + return 1 - la = sorted(set(io.open(patha, encoding="utf-8").readlines())) - lb = sorted(set(io.open(pathb, encoding="utf-8").readlines())) - if la != lb: - _show_diff(la, lb, patha, pathb) - return False + return 0 - return True + return 1 def validation_test_suite( @@ -112,12 +118,10 @@ def validation_test_suite( schemas, base_uri, report_filename, - isyntax, command_prefix, ): """Run all tests in a test suite manifest.""" - mf = "http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#" test_dir = os.path.dirname(manifest_path) model, instances = serd_test_util.load_rdf( manifest_path, base_uri, command_prefix @@ -133,71 +137,53 @@ def validation_test_suite( asserter = "http://drobilla.net/drobilla#me" class Results: + """Aggregated count of all tests and results.""" def __init__(self): self.n_tests = 0 self.n_failures = 0 - def run_tests(test_class, tests, expected_return, results): + def run_tests(tests, expected_return, results): for test in sorted(tests): - test_uri = model[test][mf + "action"][0] + test_uri = model[test][NS_MF + "action"][0] test_uri_path = _uri_path(test_uri) test_name = os.path.basename(test_uri_path) test_path = os.path.join(test_dir, test_name) - - command = ( - command_prefix - + [ - "-V", - "-I", - test_uri, - test_path, - ] - + schemas - ) out_filename = os.path.join(out_test_dir, test_name + ".out") results.n_tests += 1 if expected_return == 0: # Positive test + options = ["-V", "all", "-I", test_uri] + command = command_prefix + options + schemas + [test_path] - with open(out_filename, "w") as stdout: - proc = subprocess.run(command, check=False, stdout=stdout) - if proc.returncode == 0: - passed = True - else: - results.n_failures += 1 - sys.stderr.write( - "error: Unexpected failure of command: {}\n".format( - " ".join(shlex.quote(c) for c in command) - ) - ) + status = _run_positive_test(command, out_filename) + passed = status == 0 + results.n_failures += status else: # Negative test - with open(out_filename, "w") as stdout: - with tempfile.TemporaryFile() as stderr: - proc = subprocess.run( - command, check=False, stdout=stdout, stderr=stderr - ) - - if proc.returncode != 0: - passed = True - else: - results.n_failures += 1 - sys.stderr.write( - "error: Unexpected success of command: {}\n".format( - " ".join(shlex.quote(c) for c in command) - ) - ) - - # Check that an error message was printed - stderr.seek(0, 2) # Seek to end - if stderr.tell() == 0: # Empty - sys.stderr.write( - "error: No error message printed by command: {}\n".format( - " ".join(shlex.quote(c) for c in command) - ) - ) - result = 1 + if NS_SERD + "triggersCheck" not in model[test]: + log_error("{} has no serd:triggersCheck".format(test_name)) + + check_names = [] + if NS_SERD + "triggersCheck" in model[test]: + for check in model[test][NS_SERD + "triggersCheck"]: + check_names += [check[len(NS_CHECKS) :]] + + # FIXME: doesn't work + # options = ["-I", test_uri] + options = [] + for check_name in check_names: + options += ["-V", check_name] + + options += ["-I", test_uri] + + # options = ["-V", "instanceType", "-V", "propertyRange", "-V", "propertyDomain", "-V", check_name, "-I", test_uri] + # options = ["-V", "all", "-I", test_uri] + command = command_prefix + options + schemas + [test_path] + + status = _run_negative_test(command, check_name, out_filename) + passed = status == 0 + results.n_failures += status # Write test report entry if report_filename: @@ -212,14 +198,12 @@ def validation_test_suite( for test_class, instances in instances.items(): if test_class.startswith(ns_serd): expected = 1 if "Negative" in test_class else 0 - run_tests(test_class, instances, expected, results) + run_tests(instances, expected, results) # Print result summary if results.n_failures > 0: - sys.stderr.write( - "error: {}/{} tests failed\n".format( - results.n_failures, results.n_tests - ) + log_error( + "{}/{} tests failed\n".format(results.n_failures, results.n_tests) ) else: sys.stdout.write("All {} tests passed\n".format(results.n_tests)) @@ -238,7 +222,6 @@ def main(): parser.add_argument("--report", help="path to write result report to") parser.add_argument("--serdi", default="serdi", help="path to serdi") - parser.add_argument("--syntax", default="turtle", help="input syntax") parser.add_argument("--wrapper", default="", help="executable wrapper") parser.add_argument("manifest", help="test suite manifest.ttl file") parser.add_argument("base_uri", help="base URI for tests") @@ -252,7 +235,6 @@ def main(): args.schema, args.base_uri, args.report, - args.syntax, command_prefix, ) @@ -260,9 +242,9 @@ def main(): if __name__ == "__main__": try: sys.exit(main()) - except subprocess.CalledProcessError as e: - if e.stderr is not None: - sys.stderr.write(e.stderr.decode("utf-8")) + except subprocess.CalledProcessError as error: + if error.stderr is not None: + sys.stderr.write(error.stderr.decode("utf-8")) - sys.stderr.write("error: %s\n" % e) - sys.exit(e.returncode) + log_error(str(error) + "\n") + sys.exit(error.returncode) diff --git a/test/test_model.c b/test/test_model.c index cd1728e8..dce0f0b8 100644 --- a/test/test_model.c +++ b/test/test_model.c @@ -359,7 +359,7 @@ test_all_begin(SerdWorld* world, const unsigned n_quads) (void)n_quads; SerdModel* model = serd_model_new(world, SERD_INDEX_SPO); - SerdRange* all = serd_model_all(model); + SerdRange* all = serd_model_all(model, SERD_ORDER_SPO); SerdIter* begin = serd_model_find(model, NULL, NULL, NULL, NULL); assert(serd_iter_equals(serd_range_begin(all), begin)); assert(serd_iter_equals(serd_range_cbegin(all), begin)); @@ -569,8 +569,8 @@ test_range(SerdWorld* world, const unsigned n_quads) SerdModel* model = serd_model_new(world, SERD_INDEX_SPO); generate(world, model, n_quads, NULL); - SerdRange* range1 = serd_model_all(model); - SerdRange* range2 = serd_model_all(model); + SerdRange* range1 = serd_model_all(model, SERD_ORDER_SPO); + SerdRange* range2 = serd_model_all(model, SERD_ORDER_SPO); assert(!serd_range_empty(range1)); assert(serd_range_empty(NULL)); @@ -757,7 +757,7 @@ test_write_bad_list(SerdWorld* world, const unsigned n_quads) SerdByteSink* out = serd_byte_sink_new_buffer(&buffer); SerdWriter* writer = serd_writer_new(world, SERD_TURTLE, 0, env, out); - SerdRange* all = serd_model_all(model); + SerdRange* all = serd_model_all(model, SERD_ORDER_SPO); serd_range_serialise(all, serd_writer_sink(writer), 0); serd_range_free(all); @@ -840,7 +840,7 @@ test_write_error_in_list(SerdWorld* world, const unsigned n_quads) SerdWriter* writer = serd_writer_new(world, SERD_TURTLE, 0, env, out); const SerdSink* const sink = serd_writer_sink(writer); - SerdRange* const all = serd_model_all(model); + SerdRange* const all = serd_model_all(model, SERD_ORDER_SPO); const SerdStatus st = serd_range_serialise(all, sink, 0); serd_range_free(all); diff --git a/test/test_quiet.py b/test/test_quiet.py index e27cb9ea..4d6dfaa5 100755 --- a/test/test_quiet.py +++ b/test/test_quiet.py @@ -17,5 +17,7 @@ args = parser.parse_args(sys.argv[1:]) command = shlex.split(args.wrapper) + [args.serdi, "-q", args.input] proc = subprocess.run(command, check=False, capture_output=True) +print(' '.join([shlex.quote(c) for c in command])) assert proc.returncode != 0 +print(proc.stderr) assert len(proc.stderr) == 0 diff --git a/test/validate/bad-all-values-from.ttl b/test/validate/bad-all-values-from.ttl index e8243423..4d82bf3d 100644 --- a/test/validate/bad-all-values-from.ttl +++ b/test/validate/bad-all-values-from.ttl @@ -2,17 +2,23 @@ @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +eg:index + a rdf:Property ; + rdfs:label "index" . eg:Thing a rdfs:Class ; + rdfs:label "Thing" ; rdfs:subClassOf [ a owl:Restriction ; - owl:onProperty rdfs:label ; - owl:allValuesFrom rdf:PlainLiteral + owl:onProperty eg:index ; + owl:allValuesFrom xsd:nonNegativeInteger ] . eg:s a eg:Thing ; - rdfs:label "plain" , - "not plain"^^rdf:XMLLiteral . + eg:index 1.2 , + 3 . diff --git a/test/validate/bad-anyuri.ttl b/test/validate/bad-anyuri.ttl new file mode 100644 index 00000000..ae5e88f0 --- /dev/null +++ b/test/validate/bad-anyuri.ttl @@ -0,0 +1,13 @@ +@prefix eg: <http://example.org/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +eg:uri + a rdf:Property ; + rdfs:label "uri" ; + rdfs:range xsd:anyURI . + +eg:s + eg:uri _:blank . + diff --git a/test/validate/bad-cardinality-high.ttl b/test/validate/bad-cardinality-high.ttl index 7e1605c3..2ff8ede3 100644 --- a/test/validate/bad-cardinality-high.ttl +++ b/test/validate/bad-cardinality-high.ttl @@ -5,6 +5,7 @@ eg:Thing a rdfs:Class ; + rdfs:label "Thing" ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty rdf:value ; diff --git a/test/validate/bad-cardinality-low.ttl b/test/validate/bad-cardinality-low.ttl index 93dd0051..60bfc9f8 100644 --- a/test/validate/bad-cardinality-low.ttl +++ b/test/validate/bad-cardinality-low.ttl @@ -5,6 +5,7 @@ eg:Thing a rdfs:Class ; + rdfs:label "Thing" ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty rdf:value ; diff --git a/test/validate/bad-cardinality.ttl b/test/validate/bad-cardinality.ttl index 481fe456..5300e566 100644 --- a/test/validate/bad-cardinality.ttl +++ b/test/validate/bad-cardinality.ttl @@ -5,6 +5,7 @@ eg:Thing a rdfs:Class ; + rdfs:label "Thing" ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty rdf:value ; diff --git a/test/validate/bad-class-type-undefined.ttl b/test/validate/bad-class-type-undefined.ttl new file mode 100644 index 00000000..1e3c5eba --- /dev/null +++ b/test/validate/bad-class-type-undefined.ttl @@ -0,0 +1,5 @@ +@prefix eg: <http://example.org/> . + +eg:s + a eg:Undefined . + diff --git a/test/validate/bad-class-type.ttl b/test/validate/bad-class-type.ttl new file mode 100644 index 00000000..a0ddf454 --- /dev/null +++ b/test/validate/bad-class-type.ttl @@ -0,0 +1,9 @@ +@prefix eg: <http://example.org/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . + +eg:nonClass + a rdf:Bag . + +eg:s + a eg:nonClass . + diff --git a/test/validate/bad-datatype-property.ttl b/test/validate/bad-datatype-property.ttl index a3e993f3..3c2f7a9f 100644 --- a/test/validate/bad-datatype-property.ttl +++ b/test/validate/bad-datatype-property.ttl @@ -3,16 +3,17 @@ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -eg:value - rdfs:label "value" ; - a owl:DatatypeProperty . +eg:name + a owl:DatatypeProperty ; + rdfs:label "name" . eg:Thing - a rdfs:Class . + a rdfs:Class ; + rdfs:label "Thing" . eg:s1 a eg:Thing . eg:s2 - eg:value eg:s1 . + eg:name eg:s1 . diff --git a/test/validate/bad-deprecated-class.ttl b/test/validate/bad-deprecated-class.ttl new file mode 100644 index 00000000..51d76d8f --- /dev/null +++ b/test/validate/bad-deprecated-class.ttl @@ -0,0 +1,12 @@ +@prefix eg: <http://example.org/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +eg:Square + a rdfs:Class ; + owl:deprecated true ; + rdfs:label "Square" . + +eg:square + a eg:Square . + diff --git a/test/validate/bad-deprecated-property.ttl b/test/validate/bad-deprecated-property.ttl new file mode 100644 index 00000000..b2bd392c --- /dev/null +++ b/test/validate/bad-deprecated-property.ttl @@ -0,0 +1,13 @@ +@prefix eg: <http://example.org/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +eg:stuff + a rdf:Property ; + owl:deprecated true ; + rdfs:label "stuff" . + +eg:s + eg:stuff eg:o . + diff --git a/test/validate/bad-domain.ttl b/test/validate/bad-domain.ttl index d36b5652..52c1849c 100644 --- a/test/validate/bad-domain.ttl +++ b/test/validate/bad-domain.ttl @@ -1,19 +1,27 @@ @prefix eg: <http://example.org/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . eg:Thing - a rdfs:Class . + a rdfs:Class ; + rdfs:subClassOf [ + a owl:Restriction ; + owl:onProperty rdf:value ; + owl:cardinality 1 + ] ; + rdfs:label "Thing" . eg:NonThing - a rdfs:Class . + a rdfs:Class ; + rdfs:label "NonThing" . -eg:value +eg:thingName a rdf:Property ; - rdfs:label "value" ; + rdfs:label "thing name" ; rdfs:domain eg:Thing . eg:nonthing a eg:NonThing ; - eg:value 42 . + eg:thingName "nonthing" . diff --git a/test/validate/bad-literal-pattern.ttl b/test/validate/bad-literal-pattern.ttl index 40f9eec0..fda954ed 100644 --- a/test/validate/bad-literal-pattern.ttl +++ b/test/validate/bad-literal-pattern.ttl @@ -1,7 +1,22 @@ @prefix eg: <http://example.org/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . -eg:s - rdf:value "no"^^xsd:boolean . +eg:CapitalLiteral + a rdfs:Datatype ; + rdfs:label "Capital Literal" ; + owl:withRestrictions ( + [ + xsd:pattern "[A-Z][a-z]*" + ] + ) . + +eg:value + a rdf:Property ; + rdfs:label "value" ; + rdfs:range eg:CapitalLiteral . +eg:s + eg:value "lowercase"^^eg:CapitalLiteral . diff --git a/test/validate/bad-literal-value-high-exclusive.ttl b/test/validate/bad-literal-value-high-exclusive.ttl index f83d2216..fafc74c8 100644 --- a/test/validate/bad-literal-value-high-exclusive.ttl +++ b/test/validate/bad-literal-value-high-exclusive.ttl @@ -6,7 +6,7 @@ eg:Normal a rdfs:Datatype ; - rdfs:label "normal" ; + rdfs:label "Normal" ; owl:onDatatype xsd:double ; owl:withRestrictions ( [ diff --git a/test/validate/bad-literal-value-high-inclusive.ttl b/test/validate/bad-literal-value-high-inclusive.ttl index c0753250..db19f1cd 100644 --- a/test/validate/bad-literal-value-high-inclusive.ttl +++ b/test/validate/bad-literal-value-high-inclusive.ttl @@ -6,7 +6,7 @@ eg:Normal a rdfs:Datatype ; - rdfs:label "normal" ; + rdfs:label "Normal" ; owl:onDatatype xsd:double ; owl:withRestrictions ( [ diff --git a/test/validate/bad-literal-value-low-exclusive.ttl b/test/validate/bad-literal-value-low-exclusive.ttl index 09ca9f93..082ae9d9 100644 --- a/test/validate/bad-literal-value-low-exclusive.ttl +++ b/test/validate/bad-literal-value-low-exclusive.ttl @@ -6,7 +6,7 @@ eg:Normal a rdfs:Datatype ; - rdfs:label "normal" ; + rdfs:label "Normal" ; owl:onDatatype xsd:double ; owl:withRestrictions ( [ diff --git a/test/validate/bad-literal-value-low-inclusive.ttl b/test/validate/bad-literal-value-low-inclusive.ttl index 6ae5758b..c7203c81 100644 --- a/test/validate/bad-literal-value-low-inclusive.ttl +++ b/test/validate/bad-literal-value-low-inclusive.ttl @@ -6,7 +6,7 @@ eg:Normal a rdfs:Datatype ; - rdfs:label "normal" ; + rdfs:label "Normal" ; owl:onDatatype xsd:double ; owl:withRestrictions ( [ diff --git a/test/validate/bad-literal-value.ttl b/test/validate/bad-literal-value.ttl new file mode 100644 index 00000000..4c33175f --- /dev/null +++ b/test/validate/bad-literal-value.ttl @@ -0,0 +1,7 @@ +@prefix eg: <http://example.org/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +eg:s + rdf:value "one"^^xsd:integer . + diff --git a/test/validate/bad-object-property.ttl b/test/validate/bad-object-property.ttl index b4a31f9d..335db339 100644 --- a/test/validate/bad-object-property.ttl +++ b/test/validate/bad-object-property.ttl @@ -3,10 +3,10 @@ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -eg:value - rdfs:label "value" ; +eg:child + rdfs:label "child" ; a owl:ObjectProperty . eg:s - eg:value "literal" . + eg:child "literal" . diff --git a/test/validate/bad-pattern.ttl b/test/validate/bad-pattern.ttl index 1b764c78..fef79aeb 100644 --- a/test/validate/bad-pattern.ttl +++ b/test/validate/bad-pattern.ttl @@ -6,18 +6,18 @@ eg:BrokenLiteral a rdfs:Datatype ; - rdfs:label "broken literal" ; + rdfs:label "Broken Literal" ; owl:withRestrictions ( [ xsd:pattern "[" ] ) . -eg:value - a rdf:Property ; - rdfs:label "value" ; - rdfs:range eg:BinaryLiteral . +# eg:value +# a rdf:Property ; +# rdfs:label "value" ; +# rdfs:range eg:BrokenLiteral . eg:s - eg:value "no match"^^eg:BrokenLiteral . + rdf:value "no match"^^eg:BrokenLiteral . diff --git a/test/validate/bad-plain-literal.ttl b/test/validate/bad-plain-literal.ttl index 116faac0..c6f60c2c 100644 --- a/test/validate/bad-plain-literal.ttl +++ b/test/validate/bad-plain-literal.ttl @@ -8,5 +8,5 @@ eg:value rdfs:range rdf:PlainLiteral . eg:s - eg:value "literal"^^rdf:XMLLiteral . + eg:value "typed"^^rdf:XMLLiteral . diff --git a/test/validate/bad-unknown-property.ttl b/test/validate/bad-predicate-type-undefined.ttl index 0db1e85c..246594ee 100644 --- a/test/validate/bad-unknown-property.ttl +++ b/test/validate/bad-predicate-type-undefined.ttl @@ -1,5 +1,4 @@ @prefix eg: <http://example.org/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . eg:s eg:undefined 0 . diff --git a/test/validate/bad-predicate-type.ttl b/test/validate/bad-predicate-type.ttl new file mode 100644 index 00000000..84163d64 --- /dev/null +++ b/test/validate/bad-predicate-type.ttl @@ -0,0 +1,9 @@ +@prefix eg: <http://example.org/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . + +eg:nonProperty + a rdf:Bag . + +eg:s + eg:nonProperty 0 . + diff --git a/test/validate/bad-range-instance-not-literal.ttl b/test/validate/bad-range-instance-not-literal.ttl index ea7803f6..5132a70f 100644 --- a/test/validate/bad-range-instance-not-literal.ttl +++ b/test/validate/bad-range-instance-not-literal.ttl @@ -3,7 +3,8 @@ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . eg:Thing - a rdfs:Class . + a rdfs:Class ; + rdfs:label "Thing" . eg:value a rdf:Property ; diff --git a/test/validate/bad-range-instance.ttl b/test/validate/bad-range-instance.ttl index a04a5476..74403d49 100644 --- a/test/validate/bad-range-instance.ttl +++ b/test/validate/bad-range-instance.ttl @@ -3,10 +3,12 @@ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . eg:Thing - a rdfs:Class . + a rdfs:Class ; + rdfs:label "Thing" . eg:NonThing - a rdfs:Class . + a rdfs:Class ; + rdfs:label "NonThing" . eg:value a rdf:Property ; diff --git a/test/validate/bad-range-literal-not-instance.ttl b/test/validate/bad-range-literal-not-instance.ttl index f46de8ce..039fcea8 100644 --- a/test/validate/bad-range-literal-not-instance.ttl +++ b/test/validate/bad-range-literal-not-instance.ttl @@ -3,7 +3,8 @@ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . eg:Thing - a rdfs:Class . + a rdfs:Class ; + rdfs:label "Thing" . eg:value a rdf:Property ; diff --git a/test/validate/bad-range-literal.ttl b/test/validate/bad-range-literal.ttl index 10750391..d656aa16 100644 --- a/test/validate/bad-range-literal.ttl +++ b/test/validate/bad-range-literal.ttl @@ -6,22 +6,22 @@ eg:Normal a rdfs:Datatype ; - rdfs:label "normal" ; + rdfs:label "Normal" ; owl:onDatatype xsd:double ; owl:withRestrictions ( [ - xsd:maxExclusive 1.0 + xsd:maxInclusive 1.0 ] [ - xsd:minExclusive 0.0 + xsd:minInclusive 0.0 ] ) . -eg:value +eg:scaled a rdf:Property ; - rdfs:label "value" ; + rdfs:label "scaled" ; rdfs:range eg:Normal . eg:s - eg:value 2.0 . + eg:scaled 2.0 . diff --git a/test/validate/bad-some-values-from.ttl b/test/validate/bad-some-values-from.ttl index 259bfb88..9a8ee849 100644 --- a/test/validate/bad-some-values-from.ttl +++ b/test/validate/bad-some-values-from.ttl @@ -5,6 +5,7 @@ eg:Thing a rdfs:Class ; + rdfs:label "Thing" ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty rdfs:label ; diff --git a/test/validate/bad-string-literal-value-high.ttl b/test/validate/bad-string-literal-value-high.ttl index 6622c35b..93e675ef 100644 --- a/test/validate/bad-string-literal-value-high.ttl +++ b/test/validate/bad-string-literal-value-high.ttl @@ -6,7 +6,7 @@ eg:startsWithC a rdfs:Datatype ; - rdfs:label "starts with C" ; + rdfs:label "Starts With C" ; owl:onDatatype xsd:string ; owl:withRestrictions ( [ diff --git a/test/validate/bad-string-literal-value-low.ttl b/test/validate/bad-string-literal-value-low.ttl index 06833a46..2b6985f8 100644 --- a/test/validate/bad-string-literal-value-low.ttl +++ b/test/validate/bad-string-literal-value-low.ttl @@ -6,7 +6,7 @@ eg:betweenBAndD a rdfs:Datatype ; - rdfs:label "between B and D" ; + rdfs:label "Between B and D" ; owl:onDatatype xsd:string ; owl:withRestrictions ( [ diff --git a/test/validate/bad-subclass-cycle.ttl b/test/validate/bad-subclass-cycle.ttl new file mode 100644 index 00000000..1e702832 --- /dev/null +++ b/test/validate/bad-subclass-cycle.ttl @@ -0,0 +1,13 @@ +@prefix eg: <http://example.org/> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +eg:Square + a rdfs:Class ; + rdfs:subClassOf eg:Rectangle ; + rdfs:label "Square" . + +eg:Rectangle + a rdfs:Class ; + rdfs:subClassOf eg:Square ; + rdfs:label "Rectangle" . + diff --git a/test/validate/bad-subproperty-cycle.ttl b/test/validate/bad-subproperty-cycle.ttl new file mode 100644 index 00000000..eb3bbee4 --- /dev/null +++ b/test/validate/bad-subproperty-cycle.ttl @@ -0,0 +1,14 @@ +@prefix eg: <http://example.org/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +eg:stuff + a rdf:Property ; + rdfs:subPropertyOf eg:things ; + rdfs:label "stuff" . + +eg:things + a rdf:Property ; + rdfs:subPropertyOf eg:stuff ; + rdfs:label "things" . + diff --git a/test/validate/bad-superclass-restriction.ttl b/test/validate/bad-superclass-restriction.ttl new file mode 100644 index 00000000..bd820de4 --- /dev/null +++ b/test/validate/bad-superclass-restriction.ttl @@ -0,0 +1,22 @@ +@prefix eg: <http://example.org/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +eg:SuperThing + a rdfs:Class ; + rdfs:label "SuperThing" ; + rdfs:subClassOf [ + a owl:Restriction ; + owl:onProperty rdf:value ; + owl:minCardinality 1 + ] . + +eg:Thing + a rdfs:Class ; + rdfs:label "Thing" ; + rdfs:subClassOf eg:SuperThing . + +eg:s + a eg:Thing . + diff --git a/test/validate/good-anyuri.ttl b/test/validate/good-anyuri.ttl new file mode 100644 index 00000000..e05f8b71 --- /dev/null +++ b/test/validate/good-anyuri.ttl @@ -0,0 +1,13 @@ +@prefix eg: <http://example.org/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +eg:uri + a rdf:Property ; + rdfs:label "uri" ; + rdfs:range xsd:anyURI . + +eg:s + eg:uri <http://example.org> . + diff --git a/test/validate/good-cardinality.ttl b/test/validate/good-cardinality.ttl index 6b0b87da..74615fdc 100644 --- a/test/validate/good-cardinality.ttl +++ b/test/validate/good-cardinality.ttl @@ -5,6 +5,7 @@ eg:Thing a rdfs:Class ; + rdfs:label "Thing" ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty rdf:value ; diff --git a/test/validate/good-literal-value-high-inclusive.ttl b/test/validate/good-literal-value-high-inclusive.ttl index bbaa84a2..18cbed0e 100644 --- a/test/validate/good-literal-value-high-inclusive.ttl +++ b/test/validate/good-literal-value-high-inclusive.ttl @@ -6,7 +6,7 @@ eg:Normal a rdfs:Datatype ; - rdfs:label "normal" ; + rdfs:label "Normal" ; owl:onDatatype xsd:double ; owl:withRestrictions ( [ diff --git a/test/validate/good-literal-value-low-inclusive.ttl b/test/validate/good-literal-value-low-inclusive.ttl index 61943a36..e6ad334c 100644 --- a/test/validate/good-literal-value-low-inclusive.ttl +++ b/test/validate/good-literal-value-low-inclusive.ttl @@ -6,7 +6,7 @@ eg:Normal a rdfs:Datatype ; - rdfs:label "normal" ; + rdfs:label "Normal" ; owl:onDatatype xsd:double ; owl:withRestrictions ( [ diff --git a/test/validate/good-owl-thing.ttl b/test/validate/good-owl-thing.ttl new file mode 100644 index 00000000..9c4b570d --- /dev/null +++ b/test/validate/good-owl-thing.ttl @@ -0,0 +1,16 @@ +@prefix eg: <http://example.org/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +eg:someThing + a rdf:Property ; + rdfs:label "some thing" ; + rdfs:range owl:Thing . + +eg:thisThing + rdfs:label "this thing" . + +eg:s + eg:someThing eg:thisThing . + diff --git a/test/validate/good-pattern.ttl b/test/validate/good-pattern.ttl index 569cd424..740ec22c 100644 --- a/test/validate/good-pattern.ttl +++ b/test/validate/good-pattern.ttl @@ -6,7 +6,7 @@ eg:CapitalLiteral a rdfs:Datatype ; - rdfs:label "capital literal" ; + rdfs:label "Capital Literal" ; owl:withRestrictions ( [ xsd:pattern "[A-Z][a-z]*" diff --git a/test/validate/good-rdfs-resource.ttl b/test/validate/good-rdfs-resource.ttl new file mode 100644 index 00000000..26310553 --- /dev/null +++ b/test/validate/good-rdfs-resource.ttl @@ -0,0 +1,12 @@ +@prefix eg: <http://example.org/> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . + +eg:resource + a rdf:Property ; + rdfs:label "resource" ; + rdfs:range rdfs:Resource . + +eg:s + eg:resource <http://example.org> . + diff --git a/test/validate/good-some-values-from.ttl b/test/validate/good-some-values-from.ttl index 1da49270..23f977fd 100644 --- a/test/validate/good-some-values-from.ttl +++ b/test/validate/good-some-values-from.ttl @@ -5,6 +5,7 @@ eg:Thing a rdfs:Class ; + rdfs:label "Thing" ; rdfs:subClassOf [ a owl:Restriction ; owl:onProperty rdfs:label ; diff --git a/test/validate/good-string-literal-value-low.ttl b/test/validate/good-string-literal-value-low.ttl index 5bfd6a9e..7d71856b 100644 --- a/test/validate/good-string-literal-value-low.ttl +++ b/test/validate/good-string-literal-value-low.ttl @@ -6,7 +6,7 @@ eg:betweenBAndD a rdfs:Datatype ; - rdfs:label "between B and D" ; + rdfs:label "Between B and D" ; owl:onDatatype xsd:string ; owl:withRestrictions ( [ diff --git a/test/validate/manifest.ttl b/test/validate/manifest.ttl index 68853073..05c0a10d 100644 --- a/test/validate/manifest.ttl +++ b/test/validate/manifest.ttl @@ -1,205 +1,349 @@ +@prefix checks: <http://drobilla.net/ns/serd/checks#> . @prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix rdft: <http://www.w3.org/ns/rdftest#> . @prefix serd: <http://drobilla.net/ns/serd#> . +rdft:Test + rdfs:subClassOf mf:ManifestEntry . + serd:TestTurtleNegativeValidate a rdfs:Class ; - rdfs:subClassOf rdft:Test . + rdfs:label "Turtle Negative Validation" ; + rdfs:subClassOf rdft:Test , + [ + rdf:type owl:Restriction ; + owl:onProperty serd:triggersCheck ; + owl:minCardinality 1 + ] . serd:TestTurtlePositiveValidate a rdfs:Class ; + rdfs:label "Turtle Positive Validation" ; rdfs:subClassOf rdft:Test . +serd:triggersCheck + a rdf:Property ; + rdfs:label "triggers check" ; + rdfs:range serd:ValidatorCheck . + <> - rdf:type mf:Manifest ; + a mf:Manifest ; rdfs:comment "Serd validation test cases" ; mf:entries ( <#bad-all-values-from> + <#bad-anyuri> <#bad-cardinality-high> <#bad-cardinality-low> <#bad-cardinality> + <#bad-class-type-undefined> + <#bad-class-type> <#bad-datatype-property> + <#bad-deprecated-class> + <#bad-deprecated-property> <#bad-domain> <#bad-functional-property> <#bad-inverse-functional-property> <#bad-literal-pattern> - <#bad-literal-value-high-inclusive> - <#bad-literal-value-low-inclusive> <#bad-literal-value-high-exclusive> + <#bad-literal-value-high-inclusive> <#bad-literal-value-low-exclusive> - <#bad-string-literal-value-high> - <#bad-string-literal-value-low> + <#bad-literal-value-low-inclusive> + <#bad-literal-value> <#bad-object-property> <#bad-pattern> <#bad-plain-literal> + <#bad-predicate-type-undefined> + <#bad-predicate-type> <#bad-range-instance-not-literal> <#bad-range-instance> <#bad-range-literal-not-instance> <#bad-range-literal> <#bad-some-values-from> + <#bad-string-literal-value-high> + <#bad-string-literal-value-low> + <#bad-subclass-cycle> + <#bad-subproperty-cycle> + <#bad-superclass-restriction> <#bad-unknown-datatype> - <#bad-unknown-property> + <#good-anyuri> <#good-cardinality> <#good-literal-value-high-inclusive> <#good-literal-value-low-inclusive> + <#good-owl-thing> <#good-pattern> + <#good-rdfs-resource> <#good-some-values-from> <#good-string-literal-value-low> ) . <#bad-all-values-from> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:allValuesFrom , + checks:instanceType ; mf:name "bad-all-values-from" ; mf:action <bad-all-values-from.ttl> . +<#bad-anyuri> + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:anyUri , + checks:propertyRange ; + mf:name "bad-anyuri" ; + mf:action <bad-anyuri.ttl> . + +<#bad-class-type-undefined> + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:classType ; + mf:name "bad-class-type-undefined" ; + mf:action <bad-class-type-undefined.ttl> . + +<#bad-class-type> + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:classType ; + mf:name "bad-class-type" ; + mf:action <bad-class-type.ttl> . + <#bad-cardinality-low> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:cardinalityMin , + checks:instanceType ; mf:name "bad-cardinality-low" ; mf:action <bad-cardinality-low.ttl> . <#bad-cardinality-high> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:cardinalityMax , + checks:instanceType ; mf:name "bad-cardinality-high" ; mf:action <bad-cardinality-high.ttl> . <#bad-cardinality> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:cardinalityEqual , + checks:instanceType ; mf:name "bad-cardinality" ; mf:action <bad-cardinality.ttl> . <#bad-datatype-property> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:datatypeProperty ; mf:name "bad-datatype-property" ; mf:action <bad-datatype-property.ttl> . +<#bad-deprecated-class> + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:deprecatedClass ; + mf:name "bad-deprecated-class" ; + mf:action <bad-deprecated-class.ttl> . + +<#bad-deprecated-property> + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:deprecatedProperty ; + mf:name "bad-deprecated-property" ; + mf:action <bad-deprecated-property.ttl> . + <#bad-domain> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:cardinalityEqual , + checks:propertyDomain ; mf:name "bad-domain" ; mf:action <bad-domain.ttl> . <#bad-functional-property> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:functionalProperty ; mf:name "bad-functional-property" ; mf:action <bad-functional-property.ttl> . <#bad-inverse-functional-property> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:inverseFunctionalProperty ; mf:name "bad-inverse-functional-property" ; mf:action <bad-inverse-functional-property.ttl> . <#bad-literal-pattern> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:literalPattern ; mf:name "bad-literal-pattern" ; mf:action <bad-literal-pattern.ttl> . <#bad-literal-value-low-inclusive> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:literalMinInclusive ; mf:name "bad-literal-value-low-inclusive" ; mf:action <bad-literal-value-low-inclusive.ttl> . <#bad-literal-value-high-inclusive> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:literalMaxInclusive ; mf:name "bad-literal-value-high-inclusive" ; mf:action <bad-literal-value-high-inclusive.ttl> . <#bad-literal-value-low-exclusive> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:literalMinExclusive ; mf:name "bad-literal-value-low-exclusive" ; mf:action <bad-literal-value-low-exclusive.ttl> . <#bad-literal-value-high-exclusive> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:literalMaxExclusive ; mf:name "bad-literal-value-high-exclusive" ; mf:action <bad-literal-value-high-exclusive.ttl> . +<#bad-literal-value> + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:literalValue ; + mf:name "bad-literal-value" ; + mf:action <bad-literal-value.ttl> . + <#bad-string-literal-value-low> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:literalMinExclusive ; mf:name "bad-string-literal-value-low" ; mf:action <bad-string-literal-value-low.ttl> . <#bad-string-literal-value-high> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:literalMaxExclusive ; mf:name "bad-string-literal-value-high" ; mf:action <bad-string-literal-value-high.ttl> . +<#bad-subclass-cycle> + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:classCycle ; + mf:name "bad-subclass-cycle" ; + mf:action <bad-subclass-cycle.ttl> . + +<#bad-subproperty-cycle> + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:propertyCycle ; + mf:name "bad-subproperty-cycle" ; + mf:action <bad-subproperty-cycle.ttl> . + +<#bad-superclass-restriction> + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:instanceType , + checks:cardinalityMin ; + mf:name "bad-superclass-restriction" ; + mf:action <bad-superclass-restriction.ttl> . + <#bad-object-property> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:objectProperty ; mf:name "bad-object-property" ; mf:action <bad-object-property.ttl> . <#bad-pattern> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:literalPattern ; mf:name "bad-pattern" ; mf:action <bad-pattern.ttl> . <#bad-plain-literal> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:plainLiteralDatatype , + checks:propertyRange ; mf:name "bad-plain-literal" ; mf:action <bad-plain-literal.ttl> . <#bad-range-instance-not-literal> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:instanceLiteral , + checks:propertyRange ; mf:name "bad-range-instance-not-literal" ; mf:action <bad-range-instance-not-literal.ttl> . <#bad-range-instance> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:instanceType , + checks:propertyRange ; mf:name "bad-range-instance" ; mf:action <bad-range-instance.ttl> . <#bad-range-literal-not-instance> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:literalInstance , + checks:propertyRange ; mf:name "bad-range-literal-not-instance" ; mf:action <bad-range-literal-not-instance.ttl> . <#bad-range-literal> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:literalMaxInclusive , + checks:propertyRange ; mf:name "bad-range-literal" ; mf:action <bad-range-literal.ttl> . <#bad-some-values-from> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:someValuesFrom , + checks:instanceType ; mf:name "bad-some-values-from" ; mf:action <bad-some-values-from.ttl> . <#bad-unknown-datatype> - rdf:type serd:TestTurtleNegativeValidate ; + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:datatypeType ; mf:name "bad-unknown-datatype" ; mf:action <bad-unknown-datatype.ttl> . -<#bad-unknown-property> - rdf:type serd:TestTurtleNegativeValidate ; - mf:name "bad-unknown-property" ; - mf:action <bad-unknown-property.ttl> . +<#bad-predicate-type-undefined> + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:predicateType ; + mf:name "bad-predicate-type-undefined" ; + mf:action <bad-predicate-type-undefined.ttl> . + +<#bad-predicate-type> + a serd:TestTurtleNegativeValidate ; + serd:triggersCheck checks:predicateType ; + mf:name "bad-predicate-type" ; + mf:action <bad-predicate-type.ttl> . + +<#good-anyuri> + a serd:TestTurtlePositiveValidate ; + mf:name "good-anyuri" ; + mf:action <good-anyuri.ttl> . <#good-cardinality> - rdf:type serd:TestTurtlePositiveValidate ; + a serd:TestTurtlePositiveValidate ; mf:name "good-cardinality" ; mf:action <good-cardinality.ttl> . <#good-literal-value-low-inclusive> - rdf:type serd:TestTurtlePositiveValidate ; + a serd:TestTurtlePositiveValidate ; mf:name "good-literal-value-low-inclusive" ; mf:action <good-literal-value-low-inclusive.ttl> . <#good-literal-value-high-inclusive> - rdf:type serd:TestTurtlePositiveValidate ; + a serd:TestTurtlePositiveValidate ; mf:name "good-literal-value-high-inclusive" ; mf:action <good-literal-value-high-inclusive.ttl> . <#good-some-values-from> - rdf:type serd:TestTurtlePositiveValidate ; + a serd:TestTurtlePositiveValidate ; mf:name "good-some-values-from" ; mf:action <good-some-values-from.ttl> . +<#good-owl-thing> + a serd:TestTurtlePositiveValidate ; + mf:name "good-owl-thing" ; + mf:action <good-owl-thing.ttl> . + <#good-pattern> - rdf:type serd:TestTurtlePositiveValidate ; + a serd:TestTurtlePositiveValidate ; mf:name "good-pattern" ; mf:action <good-pattern.ttl> . +<#good-rdfs-resource> + a serd:TestTurtlePositiveValidate ; + mf:name "good-rdfs-resource" ; + mf:action <good-rdfs-resource.ttl> . + <#good-string-literal-value-low> - rdf:type serd:TestTurtlePositiveValidate ; + a serd:TestTurtlePositiveValidate ; mf:name "good-string-literal-value-low" ; mf:action <good-string-literal-value-low.ttl> . + |