updated new tests and fixed core to match spec changes. · fekepp/jsonld-java@d0c5cfc · GitHub
Skip to content

Commit d0c5cfc

Browse files
committed
updated new tests and fixed core to match spec changes.
1 parent 85e52e6 commit d0c5cfc

20 files changed

Lines changed: 170 additions & 44 deletions

core/src/main/java/com/github/jsonldjava/core/JsonLdApi.java

Lines changed: 34 additions & 33 deletions

core/src/test/java/com/github/jsonldjava/core/JsonLdProcessorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ public void addHttpLink(String nextLink) {
318318
}
319319
}
320320

321-
@Rule
322-
public Timeout timeout = new Timeout(10000);
321+
//@Rule
322+
//public Timeout timeout = new Timeout(10000);
323323

324324
@Rule
325325
public TemporaryFolder tempDir = new TemporaryFolder();
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"@context": {
3+
"foo": "http://example.com/foo"
4+
}
5+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"@context": [{
3+
"foo": "http://example.com/foo"
4+
}, {
5+
"bar": "http://example.com/bar"
6+
}],
7+
"foo": "foo-value",
8+
"bar": "bar-value"
9+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"@context": {
3+
"foo": "http://example.com/foo"
4+
},
5+
"foo": "foo-value",
6+
"http://example.com/bar": "bar-value"
7+
}

core/src/test/resources/json-ld.org/compact-manifest.jsonld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,14 @@
569569
"input": "compact-0070-in.jsonld",
570570
"context": "compact-0070-context.jsonld",
571571
"expect": "compact-0070-out.jsonld"
572+
}, {
573+
"@id": "#t0071",
574+
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
575+
"name": "input has multiple @contexts, output has one",
576+
"purpose": "Expanding input with multiple @contexts and compacting with just one doesn't output undefined properties",
577+
"input": "compact-0071-in.jsonld",
578+
"context": "compact-0071-context.jsonld",
579+
"expect": "compact-0071-out.jsonld"
572580
}
573581
]
574582
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "json-ld/tests",
3+
"type": "library",
4+
"description": "The offical JSON-LD test suite",
5+
"keywords": [ "JSON-LD", "jsonld" ],
6+
"homepage": "http://json-ld.org/test-suite/",
7+
"license": "CC0-1.0",
8+
"authors": [
9+
{
10+
"name": "JSON-LD Community Group",
11+
"homepage": "http://json-ld.org/"
12+
}
13+
],
14+
"support": {
15+
"email": "public-linked-json@w3.org",
16+
"irc": "irc://irc.freenode.org/json-ld",
17+
"source": "https://github.com/json-ld/json-ld.org/",
18+
"issues": "https://github.com/json-ld/json-ld.org/issues"
19+
}
20+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"@context": {
3+
"foo": "http://example.org/foo",
4+
"bar": { "@reverse": "http://example.org/bar", "@type": "@id" }
5+
},
6+
"foo": "Foo",
7+
"bar": [ "http://example.org/origin", "_:b0" ]
8+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
{
3+
"@id": "_:b0",
4+
"http://example.org/foo": [ { "@value": "Foo" } ]
5+
},
6+
{
7+
"@id": "_:b1",
8+
"http://example.org/bar": [ { "@id": "_:b0" } ]
9+
},
10+
{
11+
"@id": "http://example.org/origin",
12+
"http://example.org/bar": [ { "@id": "_:b0" } ]
13+
}
14+
]

core/src/test/resources/json-ld.org/flatten-manifest.jsonld

Lines changed: 7 additions & 0 deletions

0 commit comments

Comments
 (0)