- Timestamp:
- 03/01/08 19:42:36 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/HTTP-MobileAgent-Plugin-Locator/branches/get_locator_from_params/t/01.get_location.t
r4137 r7333 13 13 is_deeply( { lat => $location->lat, lng => $location->lng }, 14 14 { lat => '35.21.03.342', lng => '138.34.45.725' } ); 15 16 # BasicLocation on GPS compliant device 17 $location = $agent->get_location( { 18 AREACODE => '05902', LAT => '+35.39.43.538', LON => '+139.44.06.232', GEO => 'wgs84', XACC => 1 19 } ); 20 is ref $location, 'Geo::Coordinates::Converter::Point'; 21 is_deeply( { lat => $location->lat, lng => $location->lng }, 22 { lat => '35.39.43.538', lng => '139.44.06.232' } ); 23 24 $location = $agent->get_location( { 25 AREACODE => '05902' 26 } ); 27 is ref $location, 'Geo::Coordinates::Converter::Point'; 28 is_deeply( { lat => $location->lat, lng => $location->lng }, 29 { lat => '35.39.43.535', lng => '139.44.06.233' } ); 15 30 } 16 31 … … 43 58 is_deeply( { lat => $location->lat, lng => $location->lng }, 44 59 { lat => '35.21.03.342', lng => '138.34.45.725' } ); 60 61 # BasicLocation on GPS compliant device 62 $location = $agent->get_location( { lat => '35.21.03.342', lon => '138.34.45.725' } ); 63 is ref $location, 'Geo::Coordinates::Converter::Point'; 64 is_deeply( { lat => $location->lat, lng => $location->lng }, 65 { lat => '35.21.03.342', lng => '138.34.45.725' } ); 45 66 } 46 67 … … 48 69 local $ENV{HTTP_USER_AGENT} = 'KDDI-CA31 UP.Browser/6.2.0.7.3.129 (GUI) MMP/2.0'; 49 70 my $agent = HTTP::MobileAgent->new; 50 my $location = $agent->get_location( { lat => ' +35.21.03.342', lon => '+138.34.45.725' } );71 my $location = $agent->get_location( { lat => '35.21.03.342', lon => '138.34.45.725' } ); 51 72 is ref $location, 'Geo::Coordinates::Converter::Point'; 52 73 is_deeply( { lat => $location->lat, lng => $location->lng }, … … 61 82 is_deeply( { lat => $location->lat, lng => $location->lng }, 62 83 { lat => '35.21.03.342', lng => '138.34.45.725' } ); 84 85 86 # BasicLocation on GPS compliant device 87 local $ENV{ HTTP_X_JPHONE_GEOCODE } = '352051%1a1383456%1afoo'; 88 $location = $agent->get_location(); 89 is ref $location, 'Geo::Coordinates::Converter::Point'; 90 is_deeply( { lat => $location->lat, lng => $location->lng }, 91 { lat => '35.21.02.678', lng => '138.34.44.820' } ); 63 92 } 64 93
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)