yaml-ld
yaml-ld copied to clipboard
Test: anchor names do not convey semantic information
Generate a YAML-LD document with an anchor, and an alias to that anchor, where the anchor name is a random string such that is a valid YAML identifier.
Convert that document into RDF.
Compare the result against the predefined sample to ensure that, with any anchor name, the document still represents the same RDF.
You could have different entities making the same assertion, but just using different anchor/aliases and verify that it results in only a single triple.
@gkellogg Indeed, thank you for the suggestion — it is probably easier to implement.
The randomization approach tests that among different test runs while your approach works within one test run. I do not have any strong preference between the two.