gpx/tests/magellan_test.rb

19 lines
652 B
Ruby
Raw Normal View History

2006-10-14 15:20:23 +02:00
require 'test/unit'
require File.dirname(__FILE__) + '/../lib/gpx'
class MagellanTest < Test::Unit::TestCase
2006-10-14 15:20:23 +02:00
MAGELLAN_TRACK_LOG = File.join(File.dirname(__FILE__), "gpx_files/magellan_track.log")
GPX_FILE = File.join(File.dirname(__FILE__), "gpx_files/one_segment.gpx")
def test_convert
GPX::MagellanTrackLog.convert_to_gpx(MAGELLAN_TRACK_LOG, "/tmp/gpx_from_magellan.gpx")
@gpx_file = GPX::GPXFile.new(:gpx_file => "/tmp/gpx_from_magellan.gpx")
end
def test_file_type
assert(GPX::MagellanTrackLog::is_magellan_file?(MAGELLAN_TRACK_LOG))
assert(!GPX::MagellanTrackLog::is_magellan_file?(GPX_FILE))
end
end