[tracker/wip/carlosg/sparql1.1: 47/56] tests: Set explicit order in some test queries



commit 422283f767910aa007559ee931ffaff35ced8244
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Jun 3 11:43:37 2019 +0200

    tests: Set explicit order in some test queries
    
    The order if unspecified is implementation dependent, which of course broke.

 tests/libtracker-data/expr-ops/query-ge-1.rq               | 1 +
 tests/libtracker-data/functions/functions-property-1.rq    | 2 +-
 tests/libtracker-data/functions/functions-tracker-loc-1.rq | 5 ++++-
 3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/tests/libtracker-data/expr-ops/query-ge-1.rq b/tests/libtracker-data/expr-ops/query-ge-1.rq
index 5eadb36ee..10f540664 100755
--- a/tests/libtracker-data/expr-ops/query-ge-1.rq
+++ b/tests/libtracker-data/expr-ops/query-ge-1.rq
@@ -3,3 +3,4 @@ SELECT ?s WHERE {
     ?s :p ?o .
     FILTER(?o >= 3) .
 }
+ORDER BY ?s
\ No newline at end of file
diff --git a/tests/libtracker-data/functions/functions-property-1.rq 
b/tests/libtracker-data/functions/functions-property-1.rq
index 153f9fdb5..f51da92af 100644
--- a/tests/libtracker-data/functions/functions-property-1.rq
+++ b/tests/libtracker-data/functions/functions-property-1.rq
@@ -5,4 +5,4 @@ SELECT ex:o(?b) ex:s(?a)
 { ?b a ex:B ;
   ex:a ?a
 }
-
+ORDER BY ex:o(?b)
\ No newline at end of file
diff --git a/tests/libtracker-data/functions/functions-tracker-loc-1.rq 
b/tests/libtracker-data/functions/functions-tracker-loc-1.rq
index 3145bae1e..ac3b4d340 100644
--- a/tests/libtracker-data/functions/functions-tracker-loc-1.rq
+++ b/tests/libtracker-data/functions/functions-tracker-loc-1.rq
@@ -1,11 +1,14 @@
 PREFIX ex: <http://example/>
 PREFIX ns: <http://www.w3.org/2005/xpath-functions#>
 
-SELECT ?location xsd:integer(tracker:cartesian-distance(?lat1,?lat2,?lon1,?lon2)) 
xsd:integer(tracker:haversine-distance(?lat1,?lat2,?lon1,?lon2))
+SELECT ?location ?cartesian ?harvesine
 { ?_x a ex:Location ;
       ex:name ?location ;
       ex:latitude ?lat1 ;
       ex:longitude ?lon1 .
  ex:x ex:latitude ?lat2 ;
       ex:longitude ?lon2 .
+ BIND (xsd:integer(tracker:cartesian-distance(?lat1,?lat2,?lon1,?lon2)) AS ?cartesian) .
+ BIND (xsd:integer(tracker:haversine-distance(?lat1,?lat2,?lon1,?lon2)) AS ?harvesine) .
 }
+ORDER BY ?cartesian ?harvesine
\ No newline at end of file


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]