Skip to content

Commit c0eee17

Browse files
committed
Add tests emxx, enxx, and epxx from expand to toRdf.
1 parent d8d6c3a commit c0eee17

File tree

10 files changed

+114
-0
lines changed

10 files changed

+114
-0
lines changed

tests/toRdf-manifest.jsonld

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,6 +1724,78 @@
17241724
"input": "toRdf/ec02-in.jsonld",
17251725
"expectErrorCode": "keyword redefinition",
17261726
"option": {"specVersion": "json-ld-1.1"}
1727+
}, {
1728+
"@id": "#tem01",
1729+
"@type": [ "jld:NegativeEvaluationTest", "jld:ToRDFTest" ],
1730+
"name": "Invalid container mapping",
1731+
"purpose": "Verifies that an exception is raised on expansion when a invalid container mapping is found",
1732+
"input": "toRdf/em01-in.jsonld",
1733+
"expectErrorCode": "invalid container mapping",
1734+
"option": {"specVersion": "json-ld-1.1"}
1735+
}, {
1736+
"@id": "#ten01",
1737+
"@type": [ "jld:NegativeEvaluationTest", "jld:ToRDFTest" ],
1738+
"name": "@nest MUST NOT have a string value",
1739+
"purpose": "container: @nest",
1740+
"input": "toRdf/en01-in.jsonld",
1741+
"expectErrorCode": "invalid @nest value",
1742+
"option": {"specVersion": "json-ld-1.1"}
1743+
}, {
1744+
"@id": "#ten02",
1745+
"@type": [ "jld:NegativeEvaluationTest", "jld:ToRDFTest" ],
1746+
"name": "@nest MUST NOT have a boolen value",
1747+
"purpose": "Transparent Nesting",
1748+
"input": "toRdf/en02-in.jsonld",
1749+
"expectErrorCode": "invalid @nest value",
1750+
"option": {"specVersion": "json-ld-1.1"}
1751+
}, {
1752+
"@id": "#ten03",
1753+
"@type": [ "jld:NegativeEvaluationTest", "jld:ToRDFTest" ],
1754+
"name": "@nest MUST NOT have a numeric value",
1755+
"purpose": "Transparent Nesting",
1756+
"input": "toRdf/en03-in.jsonld",
1757+
"expectErrorCode": "invalid @nest value",
1758+
"option": {"specVersion": "json-ld-1.1"}
1759+
}, {
1760+
"@id": "#ten04",
1761+
"@type": [ "jld:NegativeEvaluationTest", "jld:ToRDFTest" ],
1762+
"name": "@nest MUST NOT have a value object value",
1763+
"purpose": "Transparent Nesting",
1764+
"input": "toRdf/en04-in.jsonld",
1765+
"expectErrorCode": "invalid @nest value",
1766+
"option": {"specVersion": "json-ld-1.1"}
1767+
}, {
1768+
"@id": "#ten05",
1769+
"@type": [ "jld:NegativeEvaluationTest", "jld:ToRDFTest" ],
1770+
"name": "does not allow a keyword other than @nest for the value of @nest",
1771+
"purpose": "Transparent Nesting",
1772+
"input": "toRdf/en05-in.jsonld",
1773+
"expectErrorCode": "invalid @nest value",
1774+
"option": {"specVersion": "json-ld-1.1"}
1775+
}, {
1776+
"@id": "#ten06",
1777+
"@type": [ "jld:NegativeEvaluationTest", "jld:ToRDFTest" ],
1778+
"name": "does not allow @nest with @reverse",
1779+
"purpose": "Transparent Nesting",
1780+
"input": "toRdf/en06-in.jsonld",
1781+
"expectErrorCode": "invalid reverse property",
1782+
"option": {"specVersion": "json-ld-1.1"}
1783+
}, {
1784+
"@id": "#tep02",
1785+
"@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"],
1786+
"name": "processingMode json-ld-1.0 conflicts with @version: 1.1",
1787+
"purpose": "If processingMode is explicitly json-ld-1.0, it will conflict with 1.1 features.",
1788+
"input": "toRdf/ep02-in.jsonld",
1789+
"expectErrorCode": "processing mode conflict",
1790+
"option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}
1791+
}, {
1792+
"@id": "#tep03",
1793+
"@type": ["jld:NegativeEvaluationTest", "jld:ToRDFTest"],
1794+
"name": "@version must be 1.1",
1795+
"purpose": "If @version is specified, it must be 1.1",
1796+
"option": {"specVersion": "json-ld-1.1"},
1797+
"input": "toRdf/ep03-in.jsonld",
1798+
"expectErrorCode": "invalid @version value"
17271799
}, {
17281800
"@id": "#ter01",
17291801
"@type": [ "jld:NegativeEvaluationTest", "jld:ToRDFTest" ],

tests/toRdf/em01-in.jsonld

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"@context": {
3+
"term": {"@id": "http://example/term", "@container": "@context"}
4+
},
5+
"@id": "http://example/test#example"
6+
}

tests/toRdf/en01-in.jsonld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@nest": "This should generate an error"
4+
}

tests/toRdf/en02-in.jsonld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@nest": true
4+
}

tests/toRdf/en03-in.jsonld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@nest": 1
4+
}

tests/toRdf/en04-in.jsonld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"@vocab": "http://example.org/"},
3+
"@nest": {"@value": "This should generate an error"}
4+
}

tests/toRdf/en05-in.jsonld

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"@context": {
3+
"term": {"@id": "http://example/term", "@nest": "@id"}
4+
}
5+
}

tests/toRdf/en06-in.jsonld

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"@context": {
3+
"term": {"@reverse": "http://example/term", "@nest": "@nest"}
4+
}
5+
}

tests/toRdf/ep02-in.jsonld

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"@context": {
3+
"@version": 1.1
4+
}
5+
}

tests/toRdf/ep03-in.jsonld

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"@context": {
3+
"@version": 1.0
4+
}
5+
}

0 commit comments

Comments
 (0)