[tracker] libtracker-data: Use integers for comparison in location test
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Use integers for comparison in location test
- Date: Thu, 28 Jan 2010 15:03:45 +0000 (UTC)
commit a89bf27a3abe6051d9cde4d1e4ee8e1c584bec20
Author: Jürg Billeter <j bitron ch>
Date: Thu Jan 28 16:00:59 2010 +0100
libtracker-data: Use integers for comparison in location test
String representations of doubles may differ on different platforms,
so only compare distances after conversion to integers for now.
.../functions/functions-tracker-loc-1.out | 8 ++++----
.../functions/functions-tracker-loc-1.rq | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tests/libtracker-data/functions/functions-tracker-loc-1.out b/tests/libtracker-data/functions/functions-tracker-loc-1.out
index 55325b7..c851d0d 100644
--- a/tests/libtracker-data/functions/functions-tracker-loc-1.out
+++ b/tests/libtracker-data/functions/functions-tracker-loc-1.out
@@ -1,4 +1,4 @@
-"Helsinki" "0.0" "0.0"
-"Tampere" "161905.358015775" "160759.509081122"
-"London" "1898317.54736874" "1821325.85595572"
-"Tuvalu" "14017010.3444867" "13884463.8434573"
+"Helsinki" "0" "0"
+"Tampere" "161905" "160759"
+"London" "1898317" "1821325"
+"Tuvalu" "14017010" "13884463"
diff --git a/tests/libtracker-data/functions/functions-tracker-loc-1.rq b/tests/libtracker-data/functions/functions-tracker-loc-1.rq
index 64bc34a..3145bae 100644
--- a/tests/libtracker-data/functions/functions-tracker-loc-1.rq
+++ b/tests/libtracker-data/functions/functions-tracker-loc-1.rq
@@ -1,7 +1,7 @@
PREFIX ex: <http://example/>
PREFIX ns: <http://www.w3.org/2005/xpath-functions#>
-SELECT ?location tracker:cartesian-distance(?lat1,?lat2,?lon1,?lon2) tracker:haversine-distance(?lat1,?lat2,?lon1,?lon2)
+SELECT ?location xsd:integer(tracker:cartesian-distance(?lat1,?lat2,?lon1,?lon2)) xsd:integer(tracker:haversine-distance(?lat1,?lat2,?lon1,?lon2))
{ ?_x a ex:Location ;
ex:name ?location ;
ex:latitude ?lat1 ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]