summaryrefslogtreecommitdiff
path: root/navit/traffic
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2018-01-06 17:36:06 +0100
committermvglasow <michael -at- vonglasow.com>2018-01-06 17:36:06 +0100
commit4a969100d2c5bd19b68782ab3fd9af9d9e13aeec (patch)
treea59d72be527e3f2ab0d65757b53f90043250155a /navit/traffic
parent4b0f98bb943e14a950ab414851b2811c4884cc94 (diff)
downloadnavit-4a969100d2c5bd19b68782ab3fd9af9d9e13aeec.tar.gz
Add:traffic/dummy:Test case for update (without change)
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/traffic')
-rw-r--r--navit/traffic/dummy/traffic_dummy.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/navit/traffic/dummy/traffic_dummy.c b/navit/traffic/dummy/traffic_dummy.c
index f201746c9..720baf293 100644
--- a/navit/traffic/dummy/traffic_dummy.c
+++ b/navit/traffic/dummy/traffic_dummy.c
@@ -57,8 +57,8 @@ struct traffic_message ** traffic_dummy_get_messages(struct traffic_priv * this_
* A9 Munich–Nuremberg between Neufahrn and Allershausen, and slow traffic on the A96 Lindau–Munich
* between Gräfelfing and München-Laim.
*
- * The 10th call will report a cancellation message for the A96 (no update or cancellation is sent for
- * the A9).
+ * The 10th call will report an update message for the A9 (with a recent timestamp but otherwise the same
+ * data) and a cancellation message for the A96.
*
* They mimic TMC messages in that coordinates are approximate, TMC identifiers are supplied for the
* locations and extra data fields which can be inferred from the TMC location table are filled. The
@@ -99,13 +99,20 @@ struct traffic_message ** traffic_dummy_get_messages(struct traffic_priv * this_
break;
case 11:
- messages = g_new0(struct traffic_message *, 2);
+ messages = g_new0(struct traffic_message *, 3);
+
+ from = traffic_point_new(11.6208, 48.3164, "Neufahrn", "68", "12732-4");
+ to = traffic_point_new(11.5893, 48.429, "Allershausen", "67", "12732");
+ location = traffic_location_new(NULL, from, to, "Nürnberg", NULL, location_dir_one,
+ location_fuzziness_low_res, location_ramps_none, type_highway_land, NULL, "A9", "58:1", -1);
+ messages[0] = traffic_message_new_single_event("dummy:A9-68-67", time(NULL) - 10, time(NULL),
+ time(NULL) + 86400, 0, 0, location, event_class_congestion, event_congestion_queue);
from = traffic_point_new(11.4481, 48.1266, "Gräfelfing", "36b", "12961-2");
to = traffic_point_new(11.5028, 48.1258, "München-Laim", "38", "12961");
location = traffic_location_new(NULL, from, to, "München", NULL, location_dir_one,
location_fuzziness_low_res, location_ramps_none, type_highway_land, NULL, "A96", "58:1", -1);
- messages[0] = traffic_message_new_single_event("dummy:A96-36b-38", time(NULL), time(NULL),
+ messages[1] = traffic_message_new_single_event("dummy:A96-36b-38", time(NULL) - 10, time(NULL),
time(NULL) + 86400, 1, 0, location, 0, 0);
break;