W3C

Expansion

These tests implement the requirements for the JSON-LD-star Expansion Algorithm.

This is an HTML version of a test manifest. The JSON-LD version of this manifest may be found at expand-manifest.jsonld. The manifest vocabulary is described in the JSON-LD Test Vocabulary (JSON-LD, Turtle) and is based on the RDF Test Vocabulary.

The JSON-LD-star Test Suite is a set of tests that can be used to verify JSON-LD Processor for the RDF-star extensions to JSON-LD.

More information and an RDFS definition of the test vocabulary can be found at vocab.

General instructions for running the JSON-LD Test suites

Tests are run broadly the same as those for the core JSON-LD test suite, with the addition of the rdfstar option set to true for each test. If not set, explicitly, the test checks for proper behavior when not operating in RDF-star mode.

Running tests

The top-level manifest references the specific test manifests, which in turn reference each test associated with a particular type of behavior.

Implementations create their own infrastructure for running the test suite. In particular, the following should be considered:

Contributing Tests

If you would like to contribute a new test or a fix to an existing test, please follow these steps:

  1. Notify the JSON-LD Community mailing list, public-linked-json@w3.org, that you will be creating a new test or fix and the purpose of the change.
  2. Clone the git repository: git://github.com/json-ld/json-ld-star.git
  3. Make your changes and submit them via github, or via a 'git format-patch' to the JSON-LD Community Group mailing list.

Distribution

Distributed under the W3C Test Suite License. To contribute to a W3C Test Suite, see the policies and contribution forms.

Disclaimer

UNDER THE EXCLUSIVE LICENSE, THIS DOCUMENT AND ALL DOCUMENTS, TESTS AND SOFTWARE THAT LINK THIS STATEMENT ARE PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.

Code of Conduct

W3C functions under a code of conduct.

baseIri
https://w3c.github.io/json-ld-api/tests/

Test sequence:

Test tst01 invalid embedded node 1
id
#tst01
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Node with embedded subject without rdfstar option.
input
expand/st01-in.jsonld
expect
invalid @id value
Options
specVersion
json-ld-star
rdfstar
false
Requires
JSON-LD-star
Test tst02 ignored annotation 1
id
#tst02
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node object with @annotation property is ignored without rdfstar option.
input
expand/st02-in.jsonld
expect
expand/st02-out.jsonld
Options
specVersion
json-ld-star
rdfstar
false
Requires
JSON-LD-star
Test tst03 ignored annotation 2
id
#tst03
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Value object with @annotation property is ignored without rdfstar option
input
expand/st03-in.jsonld
expect
expand/st03-out.jsonld
Options
specVersion
json-ld-star
rdfstar
false
Requires
JSON-LD-star
Test tst04 embedded node 1
id
#tst04
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with embedded subject having no @id
input
expand/st04-in.jsonld
expect
expand/st04-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst05 embedded node 2
id
#tst05
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with embedded subject having IRI @id
input
expand/st05-in.jsonld
expect
expand/st05-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst06 embedded node 3
id
#tst06
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with embedded subject having BNode @id
input
expand/st06-in.jsonld
expect
expand/st06-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst07 embedded node 4
id
#tst07
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with embedded subject having a type
input
expand/st07-in.jsonld
expect
expand/st07-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst08 embedded node 5
id
#tst08
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with embedded subject having an IRI value
input
expand/st08-in.jsonld
expect
expand/st08-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst09 embedded node 6
id
#tst09
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with embedded subject having an BNode value
input
expand/st09-in.jsonld
expect
expand/st09-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst10 embedded node 7
id
#tst10
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with recursive embedded subject
input
expand/st10-in.jsonld
expect
expand/st10-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst11 invalid embedded node 2
id
#tst11
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Illegal node with subject having no property
input
expand/st11-in.jsonld
expect
invalid embedded node
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst12 invalid embedded node 3
id
#tst12
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Illegal node with subject having multiple properties
input
expand/st12-in.jsonld
expect
invalid embedded node
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst13 invalid embedded node 4
id
#tst13
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Illegal node with subject having multiple types
input
expand/st13-in.jsonld
expect
invalid embedded node
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst14 invalid embedded node 5
id
#tst14
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Illegal node with subject having type and property
input
expand/st14-in.jsonld
expect
invalid embedded node
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst15 embedded node 8
id
#tst15
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with embedded object
input
expand/st15-in.jsonld
expect
expand/st15-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst16 embedded node 9
id
#tst16
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with embedded object having properties
input
expand/st16-in.jsonld
expect
expand/st16-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst17 embedded node 10
id
#tst17
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with recursive embedded object
input
expand/st17-in.jsonld
expect
expand/st17-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst18 Annotation node 1
id
#tst18
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation property on value object
input
expand/st18-in.jsonld
expect
expand/st18-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst19 Annotation node 2
id
#tst19
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation property on node object
input
expand/st19-in.jsonld
expect
expand/st19-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst20 Annotation node 3
id
#tst20
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation property multiple values
input
expand/st20-in.jsonld
expect
expand/st20-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst20a Annotation node 4
id
#tst20a
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation property containing multiple properties
input
expand/st20a-in.jsonld
expect
expand/st20a-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst20b Annotation node 5
id
#tst20b
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation property containing an empty node object
input
expand/st20b-in.jsonld
expect
expand/st20b-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst21 Invalid annotation node 1
id
#tst21
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation property that is on the top-level is invalid
input
expand/st21-in.jsonld
expect
invalid annotation
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst22 Invalid annotation node 2
id
#tst22
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation property on a top-level graph node is invalid
input
expand/st22-in.jsonld
expect
invalid annotation
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst23 Invalid annotation node 3
id
#tst23
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation property having @id is invalid
input
expand/st23-in.jsonld
expect
invalid annotation
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst24 Invalid annotation node 4
id
#tst24
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation property with simple value is invalid
input
expand/st24-in.jsonld
expect
invalid annotation
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst24a Invalid annotation node 5
id
#tst24a
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation property with value object value is invalid
input
expand/st24a-in.jsonld
expect
invalid annotation
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst25 Invalid annotation node 6
id
#tst25
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
@annotation on a list
input
expand/st25-in.jsonld
expect
invalid set or list object
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst26 Invalid annotation node 7
id
#tst26
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation on a list value
input
expand/st26-in.jsonld
expect
invalid annotation
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst27 Invalid annotation node 8
id
#tst27
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
@annotation property on a top-level @included node is invalid
input
expand/st27-in.jsonld
expect
invalid annotation
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst27a Invalid annotation node 9
id
#tst27a
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation that is an embedded node is invalid
input
expand/st27a-in.jsonld
expect
invalid annotation
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst28 Embedded annotation node 1
id
#tst28
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation property on embedded subject
input
expand/st28-in.jsonld
expect
expand/st28-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst29 Embedded annotation node 1
id
#tst29
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Node with @annotation property on embedded object
input
expand/st29-in.jsonld
expect
expand/st29-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst30 embedded node 11
id
#tst30
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Embedded node with reverse relationship
input
expand/st30-in.jsonld
expect
invalid embedded node
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst31 embedded node 12
id
#tst31
Type
jld:NegativeEvaluationTest, jld:ExpandTest
Purpose
Embedded node with expanded reverse relationship
input
expand/st31-in.jsonld
expect
invalid embedded node
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst32 embedded node 13
id
#tst32
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Embedded node used as subject in reverse relationship
input
expand/st32-in.jsonld
expect
expand/st32-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst33 embedded node 14
id
#tst33
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
Embedded node used as object in reverse relationship
input
expand/st33-in.jsonld
expect
expand/st33-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst34 Reverse annotation node 1
id
#tst34
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
node with @annotation property on node object with reverse relationship
input
expand/st34-in.jsonld
expect
expand/st34-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst35 Reverse annotation node 2
id
#tst35
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
reverse relationship inside annotation
input
expand/st35-in.jsonld
expect
expand/st35-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst36 Alias for embedded node
id
#tst36
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
embedded node with an alias of `@id`
input
expand/st36-in.jsonld
expect
expand/st36-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst37 Alias for annotation node
id
#tst37
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
annotation node with an alias of `@annotation`
input
expand/st37-in.jsonld
expect
expand/st37-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst38 annotation value 1
id
#tst38
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
embedded node with annotation on value object
input
expand/st38-in.jsonld
expect
expand/st38-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst39 annotation with embedded node 1
id
#tst39
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
annotation node containing an embedded node
input
expand/st39-in.jsonld
expect
expand/st39-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star
Test tst40 annotation with annotation 1
id
#tst40
Type
jld:PositiveEvaluationTest, jld:ExpandTest
Purpose
annotation node containing an annotation node
input
expand/st40-in.jsonld
expect
expand/st40-out.jsonld
Options
specVersion
json-ld-star
rdfstar
true
Requires
JSON-LD-star