rdf4h
rdf4h copied to clipboard
Turtle quickcheck -- DO NOT MERGE!
@robstewart57 This work is intended to use QuickCheck to ensure that subject grouping is happening correctly in the Turtle serialization as was discussed in #99. I've run into an issue and wanted to get some feedback on the technique used. Basically the approach is naive: serialize a graph to Turtle format and check that the file has only one instance of each subject. This works for the most part but the QuickCheck tests occasionally fail and it turns out that they fail because the same URI is sometimes used for both subject and predicate, or subject and object. I think the solution is to update the RDF TList
Arbitrary
instance to not use the same URI for more than a given type of node. Thoughts?
I've pushed some more commits that ensure that the same URI is not reused across subjects, predicates and objects. This is the case for both UNode
s and BNode
s. I ran the QuickCheck tests for the Turtle serializer about ten times without failure and verified that these changes have not caused any regressions in other tests.
@robstewart57 Do you have any thoughts on this work? Let me know if you think changes are needed.
@tmciver Hi Tim, sorry for the delayed response, work very busy just now.
I've added a comment, above.