diff options
author | Paolo Angelelli <paolo.angelelli@qt.io> | 2019-02-05 19:42:22 +0100 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@qt.io> | 2019-02-06 11:54:12 +0000 |
commit | ad7bcebc575922fc7c5654c118794e5758d347d2 (patch) | |
tree | 022f156d3e3859b1d488e3ec8cbdfb7b89a1a699 /tests/auto/declarative_core | |
parent | 7a65e5f2b9d5ecda418e76f98acd90506025186a (diff) | |
download | qtlocation-ad7bcebc575922fc7c5654c118794e5758d347d2.tar.gz |
Add departure time attribute to route queriesv5.13.0-alpha1
So that it can be used to improve the route calculation based on
traffic information or other time-based information (ferries etc.)
Change-Id: I8bdc81046484cc4f0ebfaffbdf6f034c555d7781
Fixes: QTBUG-70503
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'tests/auto/declarative_core')
-rw-r--r-- | tests/auto/declarative_core/tst_routing.qml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/declarative_core/tst_routing.qml b/tests/auto/declarative_core/tst_routing.qml index f5204f26..1d7c1e37 100644 --- a/tests/auto/declarative_core/tst_routing.qml +++ b/tests/auto/declarative_core/tst_routing.qml @@ -929,6 +929,19 @@ Item { compare (spy.count, 21) compare(model.get(0).path.length, 3); + // departure time + verify(!model.get(0).extendedAttributes["tst_departureTime"]) + var invalidDate = new Date("abc"); // to create an invalid date + var validDate = new Date("2011-02-07T11:05:00"); + + filledRouteQuery2.departureTime = validDate + tryCompare(spy, "count", 22) + compare(model.get(0).extendedAttributes["tst_departureTime"], validDate) + + filledRouteQuery2.departureTime = invalidDate + tryCompare (spy, "count", 23) + verify(!model.get(0).extendedAttributes["tst_departureTime"]) + // ReSetting filledRouteQuery.numberAlternativeRoutes = 0 filledRouteQuery2.numberAlternativeRoutes = 0 |