Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve coverage GRAPH ?g {} #160

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sparql/sparql10/graph/graph-empty-exist.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT * { GRAPH <data-g1.ttl> {} }
5 changes: 5 additions & 0 deletions sparql/sparql10/graph/graph-empty-exist.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

[] rdf:type rs:ResultSet ;
rs:solution [] .
3 changes: 3 additions & 0 deletions sparql/sparql10/graph/graph-empty-not-exist.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PREFIX ex: <http://example.org/>

SELECT * { GRAPH ex:unknown {} }
4 changes: 4 additions & 0 deletions sparql/sparql10/graph/graph-empty-not-exist.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@prefix rs: <http://www.w3.org/2001/sw/DataAccess/tests/result-set#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

[] rdf:type rs:ResultSet .
56 changes: 55 additions & 1 deletion sparql/sparql10/graph/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ <h2>
</dt>
<dd inlist='true' property='mf:entry' resource='http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#graph-empty' typeof='mf:QueryEvaluationTest'>
<div property='rdfs:comment'>
<p>Graph with empty BGP: list all named graphs</p>
<p>Variable graph with empty BGP: list all named graphs</p>
</div>
<dl class='test-detail'>
<dt>type</dt>
Expand All @@ -402,6 +402,60 @@ <h2>
</dd>
</dl>
</dd>
<dt id='graph-exist'>
<a class='testlink' href='#graph-exist'>
graph-exist:
</a>
<span about='http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#graph-exist' property='mf:name'>graph-exist</span>
<span about='http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#graph-exist' property='mf:name'>graph-exist</span>
</dt>
<dd inlist='true' property='mf:entry' resource='http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#graph-exist' typeof='mf:QueryEvaluationTest'>
<div property='rdfs:comment'>
<p>Set graph with empty BGP: returns an empty tuple because the graph exists</p>
</div>
<dl class='test-detail'>
<dt>type</dt>
<dd>mf:QueryEvaluationTest</dd>
<dt>approval</dt>
<dd property='mf:approval' resource=''></dd>
<dt>action</dt>
<dd>
<dl class='test-detail'>
</dl>
</dd>
<dt>result</dt>
<dd>
<a href='graph-empty-exist.ttl' property='mf:result'>graph-empty-exist.ttl</a>
</dd>
</dl>
</dd>
<dt id='graph-not-exist'>
<a class='testlink' href='#graph-not-exist'>
graph-not-exist:
</a>
<span about='http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#graph-not-exist' property='mf:name'>graph-not-exist</span>
<span about='http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#graph-not-exist' property='mf:name'>graph-not-exist</span>
</dt>
<dd inlist='true' property='mf:entry' resource='http://www.w3.org/2001/sw/DataAccess/tests/data-r2/graph/manifest#graph-not-exist' typeof='mf:QueryEvaluationTest'>
<div property='rdfs:comment'>
<p>Set graph with empty BGP: returns an empty tuple because the graph exists</p>
</div>
<dl class='test-detail'>
<dt>type</dt>
<dd>mf:QueryEvaluationTest</dd>
<dt>approval</dt>
<dd property='mf:approval' resource=''></dd>
<dt>action</dt>
<dd>
<dl class='test-detail'>
</dl>
</dd>
<dt>result</dt>
<dd>
<a href='graph-empty-not-exist.ttl' property='mf:result'>graph-empty-not-exist.ttl</a>
</dd>
</dl>
</dd>
</dl>
</div>
<footer>
Expand Down
27 changes: 26 additions & 1 deletion sparql/sparql10/graph/manifest.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
:dawg-graph-10b
:dawg-graph-11
:graph-empty
:graph-exist
:graph-not-exist
).

:dawg-graph-01 rdf:type mf:QueryEvaluationTest ;
Expand Down Expand Up @@ -168,7 +170,7 @@

:graph-empty rdf:type mf:QueryEvaluationTest ;
mf:name "graph-empty" ;
rdfs:comment "Graph with empty BGP: list all named graphs" ;
rdfs:comment "Variable graph with empty BGP: list all named graphs" ;
mf:action
[ qt:query <graph-empty.rq> ;
qt:data <data-g1.ttl> ;
Expand All @@ -177,3 +179,26 @@
] ;
mf:result <graph-empty.ttl> ;
.

:graph-exist rdf:type mf:QueryEvaluationTest ;
mf:name "graph-exist" ;
rdfs:comment "Set graph with empty BGP: returns an empty tuple because the graph exists" ;
mf:action
[ qt:query <graph-empty-exist.rq> ;
qt:data <data-g1.ttl> ;
qt:graphData <data-g1.ttl> ;
qt:graphData <data-g2.ttl> ;
] ;
mf:result <graph-empty-exist.ttl> ;
.
:graph-not-exist rdf:type mf:QueryEvaluationTest ;
mf:name "graph-not-exist" ;
rdfs:comment "Set graph with empty BGP: returns an empty tuple because the graph exists" ;
mf:action
[ qt:query <graph-empty-not-exist.rq> ;
qt:data <data-g1.ttl> ;
qt:graphData <data-g1.ttl> ;
qt:graphData <data-g2.ttl> ;
] ;
mf:result <graph-empty-not-exist.ttl> ;
.