yaml-ld icon indicating copy to clipboard operation
yaml-ld copied to clipboard

Test: anchor names do not convey semantic information

Open anatoly-scherbakov opened this issue 2 years ago • 2 comments

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.

anatoly-scherbakov avatar Jun 25 '23 21:06 anatoly-scherbakov

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 avatar Jun 25 '23 21:06 gkellogg

@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.

anatoly-scherbakov avatar Jun 25 '23 23:06 anatoly-scherbakov