⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_envelope.rb

📁 在Linux下做的QuadTree的程序
💻 RB
字号:
#!/usr/bin/env rubyrequire 'test/unit'require 'geos'# NOTE - These tests are no longer valid with the C-APIclass TestGeosEnvelope < Test::Unit::TestCase  def check(envelope)    assert_equal(5, envelope.get_min_x())    assert_equal(6, envelope.get_min_y())    assert_equal(10, envelope.get_max_x())    assert_equal(11, envelope.get_max_y())  end    def test_from_coords    min_coord = Geos::Coordinate.new(5,6)    max_coord = Geos::Coordinate.new(10, 11)    envelope = Geos::Envelope.new(min_coord, max_coord)    check(envelope)  end    def test_from_values    envelope = Geos::Envelope.new(5, 10, 6, 11)    check(envelope)  end    def test_serialize    out_envelope = Geos::Envelope.new(5, 10, 6, 11)    str = out_envelope.to_string()    in_envelope = Geos::Envelope.new(str)    check(in_envelope)    assert(out_envelope.equals(in_envelope))  end  def test_to_s    envelope = Geos::Envelope.new(5, 10, 6, 11)    string = envelope.to_s    assert_equal("<Geos::Envelope Env[5:10,6:11]>", string)  endend

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -