Skip to content

Commit bbc489f

Browse files
authored
SPARQL 1.0: cover positive numeric literals (#272)
1 parent efa7de3 commit bbc489f

4 files changed

Lines changed: 42 additions & 0 deletions

File tree

sparql/sparql10/expr-ops/index.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,31 @@ <h2>
518518
</dd>
519519
</dl>
520520
</dd>
521+
<dt id='add-literals'>
522+
<a class='testlink' href='#add-literals'>
523+
add-literals:
524+
</a>
525+
<span about='http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#add-literals' property='mf:name'>Add literal numbers with + and - prefixes</span>
526+
</dt>
527+
<dd inlist='true' property='mf:entry' resource='http://www.w3.org/2001/sw/DataAccess/tests/data-r2/expr-ops/manifest#add-literals' typeof='mf:QueryEvaluationTest'>
528+
<div property='rdfs:comment'>
529+
</div>
530+
<dl class='test-detail'>
531+
<dt>type</dt>
532+
<dd>mf:QueryEvaluationTest</dd>
533+
<dt>approval</dt>
534+
<dd property='mf:approval' resource=''></dd>
535+
<dt>action</dt>
536+
<dd>
537+
<dl class='test-detail'>
538+
</dl>
539+
</dd>
540+
<dt>result</dt>
541+
<dd>
542+
<a href='result-add-literals.srx' property='mf:result'>result-add-literals.srx</a>
543+
</dd>
544+
</dl>
545+
</dd>
521546
</dl>
522547
</div>
523548
<footer>

sparql/sparql10/expr-ops/manifest.ttl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
:divide-numbers-cast
2222
:unplus-2
2323
:unminus-2
24+
:add-literals
2425
).
2526

2627

@@ -180,3 +181,10 @@
180181
qt:data <data-numbers.ttl> ] ;
181182
mf:result <result-unminus-2.srx>
182183
.
184+
185+
:add-literals a mf:QueryEvaluationTest ;
186+
mf:name "Add literal numbers with + and - prefixes" ;
187+
mf:action
188+
[ qt:query <query-add-literals.rq> ] ;
189+
mf:result <result-add-literals.srx>
190+
.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ASK {
2+
FILTER((+1 + -1 + +2.0 + -2.0 + +3e0 + -3e0) = 0)
3+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0"?>
2+
<sparql
3+
xmlns="http://www.w3.org/2005/sparql-results#">
4+
<head></head>
5+
<boolean>true</boolean>
6+
</sparql>

0 commit comments

Comments
 (0)