From: Emmanuel Rodriguez Date: Thu, 7 May 2009 20:28:31 +0000 (+0200) Subject: Test get_coords_at() X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6540b5015c145c7c65060a30ecfbaddd7bca56d9;p=libchamplain Test get_coords_at() --- diff --git a/bindings/perl/Champlain/t/ChamplainView.t b/bindings/perl/Champlain/t/ChamplainView.t index 99a95f6..b55828b 100644 --- a/bindings/perl/Champlain/t/ChamplainView.t +++ b/bindings/perl/Champlain/t/ChamplainView.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Clutter::TestHelper tests => 40; +use Clutter::TestHelper tests => 42; use Champlain ':coords'; @@ -182,6 +182,10 @@ sub test_event { my ($latitude, $longitude) = $view->get_coords_from_event($event); ok($latitude >= -2.0 && $latitude <= 2.0, "get_coords_from_event() latitude"); ok($longitude >= -2.0 && $longitude <= 2.0, "get_coords_from_event() longitude"); + + ($latitude, $longitude) = $view->get_coords_at($event->x, $event->y); + ok($latitude >= -2.0 && $latitude <= 2.0, "get_coords_at() latitude"); + ok($longitude >= -2.0 && $longitude <= 2.0, "get_coords_at() longitude"); }