json-ld / yaml-ld

CG specification for YAML-LD and UCR
https://json-ld.github.io/yaml-ld/spec
Other
19 stars 8 forks source link

Test: anchor names do not convey semantic information #103

Open anatoly-scherbakov opened 1 year ago

anatoly-scherbakov commented 1 year ago

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.

gkellogg commented 1 year ago

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.

anatoly-scherbakov commented 1 year ago

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