]> git.openstreetmap.org Git - rails.git/blob - test/lib/osm_test.rb
Bump eslint from 8.28.0 to 8.29.0
[rails.git] / test / lib / osm_test.rb
1 require "test_helper"
2
3 class OsmTest < ActiveSupport::TestCase
4   def test_mercator
5     proj = OSM::Mercator.new(0, 0, 1, 1, 100, 200)
6     assert_in_delta(50, proj.x(0.5), 0.01)
7     assert_in_delta(100, proj.y(0.5), 0.01)
8   end
9
10   def test_mercator_collapsed_bbox
11     proj = OSM::Mercator.new(0, 0, 0, 0, 100, 200)
12     assert_in_delta(50, proj.x(0), 0.01)
13     assert_in_delta(100, proj.y(0), 0.01)
14   end
15 end