root/lang/perl/Geo-iArea/trunk/t/01.convert.t @ 19939

Revision 19939, 0.9 kB (checked in by kokogiko, 5 years ago)

Initial import

Line 
1use strict;
2use Test::Base;
3use utf8;
4plan tests => 2 * blocks;
5
6use Geo::iArea;
7
8run {
9    my $block = shift;
10    my ($lat,$lng)         = grep { $_ } split(/\n/,$block->input);
11    my ($tcode,$tname)     = split(/\n/,$block->expected);
12
13    my $ia = Geo::iArea->new($lat,$lng);
14
15    if ( $ia ) {
16        is $tcode,$ia->code;
17        is $tname,$ia->name;
18    } else {
19        is $tcode,'UNDEF';
20        is $tname,'UNDEF';
21    }
22};
23
24__END__
25===
26--- input
2735.000000
28135.000000
29--- expected
3018201
31北播磨
32
33===
34--- input
3535.682660
36139.767616
37--- expected
3805700
39東京駅周辺
40
41===
42--- input
4337.343371
44138.828059
45--- expected
4604000
47長岡
48
49===
50--- input
5152354000000
52
53--- expected
5418201
55北播磨
56
57===
58--- input
5925100
60
61--- expected
6225100
63宮古/石垣
64
65===
66--- input
6720.000000
68155.000000
69--- expected
70UNDEF
71UNDEF
72
73===
74--- input
7520000000123
76
77--- expected
78UNDEF
79UNDEF
80
81===
82--- input
8345207
84
85--- expected
86UNDEF
87UNDEF
88
Note: See TracBrowser for help on using the browser.