Skip to content

Commit b3b6dad

Browse files
authored
Update plus_codes_test.rb
1 parent 67b9911 commit b3b6dad

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

ruby/test/plus_codes_test.rb

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,15 @@ def test_shorten
4747
lat = cols[1].to_f
4848
lng = cols[2].to_f
4949
short_code = cols[3]
50-
short = @olc.shorten(code, lat, lng)
51-
assert_equal(short_code, short)
52-
expanded = @olc.recover_nearest(short, lat, lng)
53-
assert_equal(code, expanded)
50+
test_type = cols[4]
51+
if test_type == 'B' || test_type == 'S'
52+
short = @olc.shorten(code, lat, lng)
53+
assert_equal(short_code, short)
54+
end
55+
if test_type == 'B' || test_type == 'R'
56+
expanded = @olc.recover_nearest(short_code, lat, lng)
57+
assert_equal(code, expanded)
58+
end
5459
end
5560
@olc.shorten('9C3W9QCJ+2VX', 60.3701125, 10.202665625)
5661
end

0 commit comments

Comments
 (0)