proj4rb 0.4.0-x86-mingw32 → 0.4.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/projrb.c +0 -2
- data/lib/1.8/proj4_ruby.so +0 -0
- data/lib/proj4.rb +417 -410
- data/test/test_constants.rb +12 -14
- data/test/test_create_projection.rb +57 -58
- data/test/test_datums.rb +38 -37
- data/test/test_ellipsoids.rb +38 -37
- data/test/test_errors.rb +50 -54
- data/test/test_init_projection.rb +94 -93
- data/test/test_prime_meridians.rb +37 -36
- data/test/test_projection_type.rb +36 -35
- data/test/test_simple_projection.rb +50 -49
- data/test/test_suite.rb +14 -0
- data/test/test_transform.rb +99 -98
- data/test/test_units.rb +38 -37
- metadata +6 -4
data/test/test_units.rb
CHANGED
@@ -1,45 +1,46 @@
|
|
1
|
-
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
2
3
|
require File.join(File.dirname(__FILE__), '..', 'lib', 'proj4')
|
3
4
|
require 'test/unit'
|
4
5
|
|
5
6
|
if Proj4::LIBVERSION >= 449
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
def test_one
|
17
|
-
unit = Proj4::Unit.get('km')
|
18
|
-
assert_kind_of Proj4::Unit, unit
|
19
|
-
assert_equal 'km', unit.id
|
20
|
-
assert_equal 'km', unit.to_s
|
21
|
-
assert_equal '1000.', unit.to_meter
|
22
|
-
assert_equal 'Kilometer', unit.name
|
23
|
-
assert_equal '#<Proj4::Unit id="km", to_meter="1000.", name="Kilometer">', unit.inspect
|
24
|
-
end
|
25
|
-
|
26
|
-
def test_compare
|
27
|
-
u1 = Proj4::Unit.get('km')
|
28
|
-
u2 = Proj4::Unit.get('km')
|
29
|
-
assert u1 == u2
|
30
|
-
end
|
31
|
-
|
32
|
-
def test_failed_get
|
33
|
-
unit = Proj4::Unit.get('foo')
|
34
|
-
assert_nil unit
|
35
|
-
end
|
36
|
-
|
37
|
-
def test_new
|
38
|
-
assert_raise TypeError do
|
39
|
-
Proj4::Unit.new
|
40
|
-
end
|
41
|
-
end
|
7
|
+
class UnitsTest < Test::Unit::TestCase
|
8
|
+
|
9
|
+
def test_get_all
|
10
|
+
units = Proj4::Unit.list.sort.collect{ |u| u.id }
|
11
|
+
assert units.index('km')
|
12
|
+
assert units.index('m')
|
13
|
+
assert units.index('yd')
|
14
|
+
assert units.index('us-mi')
|
15
|
+
end
|
42
16
|
|
17
|
+
def test_one
|
18
|
+
unit = Proj4::Unit.get('km')
|
19
|
+
assert_kind_of Proj4::Unit, unit
|
20
|
+
assert_equal 'km', unit.id
|
21
|
+
assert_equal 'km', unit.to_s
|
22
|
+
assert_equal '1000.', unit.to_meter
|
23
|
+
assert_equal 'Kilometer', unit.name
|
24
|
+
assert_equal '#<Proj4::Unit id="km", to_meter="1000.", name="Kilometer">', unit.inspect
|
43
25
|
end
|
26
|
+
|
27
|
+
def test_compare
|
28
|
+
u1 = Proj4::Unit.get('km')
|
29
|
+
u2 = Proj4::Unit.get('km')
|
30
|
+
assert u1 == u2
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_failed_get
|
34
|
+
unit = Proj4::Unit.get('foo')
|
35
|
+
assert_nil unit
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_new
|
39
|
+
assert_raise TypeError do
|
40
|
+
Proj4::Unit.new
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
44
45
|
end
|
45
46
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proj4rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 1
|
10
|
+
version: 0.4.1
|
11
11
|
platform: x86-mingw32
|
12
12
|
authors:
|
13
13
|
- Guilhem Vellut
|
@@ -92,11 +92,12 @@ files:
|
|
92
92
|
- test/test_prime_meridians.rb
|
93
93
|
- test/test_projection_type.rb
|
94
94
|
- test/test_simple_projection.rb
|
95
|
+
- test/test_suite.rb
|
95
96
|
- test/test_transform.rb
|
96
97
|
- test/test_units.rb
|
97
98
|
- lib/1.8/proj4_ruby.so
|
98
99
|
- lib/1.9/proj4_ruby.so
|
99
|
-
homepage:
|
100
|
+
homepage: https://github.com/cfis/proj4rb
|
100
101
|
licenses: []
|
101
102
|
|
102
103
|
post_install_message:
|
@@ -141,5 +142,6 @@ test_files:
|
|
141
142
|
- test/test_prime_meridians.rb
|
142
143
|
- test/test_projection_type.rb
|
143
144
|
- test/test_simple_projection.rb
|
145
|
+
- test/test_suite.rb
|
144
146
|
- test/test_transform.rb
|
145
147
|
- test/test_units.rb
|