Skip to content

Commit 2e1b8cd

Browse files
committed
fix traqula test files
1 parent 5d9949c commit 2e1b8cd

155 files changed

Lines changed: 2722 additions & 2545 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

engines/generator-sparql-1-1/test/integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ WHERE {
114114
expect(result).toBe(`
115115
BASE <ex:>
116116
CONSTRUCT {
117-
?s0 ?p0 _:g_0 . _:g_0 <a0> _:g_1 . _:g_1 <b0> <c0> . [ <a0> [ <b0> <c0> ; ] ; ] ?p0 ?o0 .
117+
?s0 ?p0 _:g_0 . _:g_0 <a0> _:g_1 . _:g_1 <b0><c0> . [<a0>[<b0><c0> ; ] ; ] ?p0 ?o0 .
118118
}
119119
WHERE {
120-
?s1 ?p1 _:g_4 . ?s1 ?p1 <a1> . ?s1 ?q1 <b1> . ?s1 ?q1 <c1> . _:g_5 ?p2 ?o2 . ?s3 ?p3 _:g_6 . _:g_6 <a3> <b3> . ?s4 ?p4 _:g_7 . _:g_7 <a4> <b4> . _:g_7 <c4> <d4> . _:g_7 <c4> <e4> . ?s5 ?p5 _:g_8 . _:g_8 <a5> _:g_9 . _:g_9 <b5> <c5> . [ <a6> [ <b6> <c6> ; ] ; ] ?p6 ?o6 . _:g_12 <a7> <b7> . _:g_12 <c7> <d7> . _:g_12 <c7> <e7> .
120+
?s1 ?p1 _:g_4 . ?s1 ?p1 <a1> . ?s1 ?q1 <b1> . ?s1 ?q1 <c1> . _:g_5 ?p2 ?o2 . ?s3 ?p3 _:g_6 . _:g_6 <a3><b3> . ?s4 ?p4 _:g_7 . _:g_7 <a4><b4> . _:g_7 <c4><d4> . _:g_7 <c4><e4> . ?s5 ?p5 _:g_8 . _:g_8 <a5> _:g_9 . _:g_9 <b5><c5> . [<a6>[<b6><c6> ; ] ; ] ?p6 ?o6 . _:g_12 <a7><b7> . _:g_12 <c7><d7> . _:g_12 <c7><e7> .
121121
}`);
122122
});
123123
});

engines/generator-sparql-1-1/test/statics.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('a SPARQL 1.1 generator', () => {
1919

2020
describe('positive paths', () => {
2121
for (const { name, statics } of positiveTest('paths')) {
22-
it(`can parse ${name}`, async({ expect }) => {
22+
it(`can generate ${name}`, async({ expect }) => {
2323
const { query, ast, autoGen } = await statics();
2424
const path = <T11.Path>ast;
2525

@@ -38,7 +38,7 @@ describe('a SPARQL 1.1 generator', () => {
3838

3939
describe('positive sparql 1.1', () => {
4040
for (const { name, statics } of positiveTest('sparql-1-1')) {
41-
it(`can parse ${name}`, async({ expect }) => {
41+
it(`can generate ${name}`, async({ expect }) => {
4242
const { query, ast, autoGen } = await statics();
4343
const queryUpdate = <T11.Query | T11.Update>ast;
4444

engines/generator-sparql-1-2/test/integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ WHERE {
115115
expect(result).toBe(`
116116
BASE <ex:>
117117
CONSTRUCT {
118-
?s0 ?p0 _:g_0 . _:g_0 <a0> _:g_1 . _:g_1 <b0> <c0> . [ <a0> [ <b0> <c0> ; ] ; ] ?p0 ?o0 .
118+
?s0 ?p0 _:g_0 . _:g_0 <a0> _:g_1 . _:g_1 <b0><c0> . [<a0>[<b0><c0> ; ] ; ] ?p0 ?o0 .
119119
}
120120
WHERE {
121-
?s1 ?p1 _:g_4 . ?s1 ?p1 <a1> . ?s1 ?q1 <b1> . ?s1 ?q1 <c1> . _:g_5 ?p2 ?o2 . ?s3 ?p3 _:g_6 . _:g_6 <a3> <b3> . ?s4 ?p4 _:g_7 . _:g_7 <a4> <b4> . _:g_7 <c4> <d4> . _:g_7 <c4> <e4> . ?s5 ?p5 _:g_8 . _:g_8 <a5> _:g_9 . _:g_9 <b5> <c5> . [ <a6> [ <b6> <c6> ; ] ; ] ?p6 ?o6 . _:g_12 <a7> <b7> . _:g_12 <c7> <d7> . _:g_12 <c7> <e7> .
121+
?s1 ?p1 _:g_4 . ?s1 ?p1 <a1> . ?s1 ?q1 <b1> . ?s1 ?q1 <c1> . _:g_5 ?p2 ?o2 . ?s3 ?p3 _:g_6 . _:g_6 <a3><b3> . ?s4 ?p4 _:g_7 . _:g_7 <a4><b4> . _:g_7 <c4><d4> . _:g_7 <c4><e4> . ?s5 ?p5 _:g_8 . _:g_8 <a5> _:g_9 . _:g_9 <b5><c5> . [<a6>[<b6><c6> ; ] ; ] ?p6 ?o6 . _:g_12 <a7><b7> . _:g_12 <c7><d7> . _:g_12 <c7><e7> .
122122
}`);
123123
});
124124
});

engines/generator-sparql-1-2/test/statics.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ describe('a SPARQL 1.2 generator', () => {
3030
const autoGenAst = F.forcedAutoGenTree(path);
3131
autoGenAst.loc = replaceLoc;
3232
const selfGenerated = generator.generatePath(autoGenAst);
33-
// SinkGenerated('paths', name, selfGenerated);
3433
expect(selfGenerated).toEqual(autoGen);
3534
});
3635
}

packages/algebra-transformer-1-1/test/recurse.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('util functions', () => {
2929
if (clone.type === 'project') {
3030
// Const scope = Util.inScopeVariables(clone.input);
3131
const project = <Project> translate(toSparql(factory.createProject(clone.input, [])));
32-
for (const v of project.variables.map(v => v.value)) {
32+
for (const _v of project.variables.map(v => v.value)) {
3333
// Expect(scope.map(v => v.value)).toContain(v);
3434
}
3535
}

packages/algebra-transformer-1-1/test/sparql.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ describe('sparql output', () => {
2929
it (name, ({ expect }) => {
3030
const expected = JSON.parse(fs.readFileSync(jsonName, 'utf8'));
3131
const genAst = toSparql(expected);
32-
console.log(JSON.stringify(genAst, null, 2));
32+
// Console.log(JSON.stringify(genAst, null, 2));
3333
const genQuery = generator.generate(genAst);
34-
console.log(genQuery);
34+
// Console.log(genQuery);
3535
const ast = parser.parse(genQuery);
3636
const algebra = LibUtil.objectify(translate(ast, {
3737
quads: name.endsWith('-quads'),

packages/algebra-transformer-1-1/test/sparql/sparql-1.1/aggregates/distinct-custom.sparql

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/algebra-transformer-1-1/test/sparql/sparql11-query/graph-with-path.sparql

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,3 @@ select * where {
77
?x :c ?t.
88
}
99
}
10-
11-
12-
13-
SELECT ?g ?t ?x WHERE {
14-
GRAPH ?g {
15-
<http://example/a> <http://example/b> ?x .
16-
<http://example/a> ( <http://example/p> )/( <http://example/p> )? ?t .
17-
?x <http://example/c> ?t .
18-
}
19-
}

packages/algebra-transformer-1-1/test/sparql/sparql11-query/update/sparql-update-3-1-3-2b-quads.sparql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,3 @@ WHERE
1313
?person foaf:name ?name .
1414
OPTIONAL { ?person foaf:mbox ?email }
1515
} }
16-
17-
INSERT{
18-
GRAPH <http://example/addresses> {
19-
?person <http://xmlns.com/foaf/0.1/name> ?name .
20-
?person <http://xmlns.com/foaf/0.1/mbox> ?email . } } WHERE {
21-
GRAPH <http://example/people> { } } ;

packages/rules-sparql-1-1/lib/factoryMixins/UpdateOperationFactory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type {
44
GraphRef,
55
GraphRefDefault,
66
GraphRefSpecific,
7-
Pattern, PatternGroup,
7+
PatternGroup,
88
Quads,
99
TermIri,
1010
UpdateOperationAdd,

0 commit comments

Comments
 (0)