Sha256: 54e5eff65b852c9b5edec1f297ac7b183098457c449f6136822f2f5b1ba97b8f

Contents?: true

Size: 946 Bytes

Versions: 38

Compression:

Stored size: 946 Bytes

Contents

# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'

class MatchMoverRZMLImportTest < Test::Unit::TestCase
  DELTA = 0.1
  
  P = File.dirname(__FILE__) + '/samples/match_mover_rzml/md_145_1070_right_t1.rzml'

  def test_introspects_properly
    i = Tracksperanto::Import::MatchMoverRZML
    assert_equal "MatchMover RZML .rzml file", i.human_name
    assert i.autodetects_size?
  end
  
  def test_parsing_from_matchmover
    fixture = File.open(P)
    
    parser = Tracksperanto::Import::MatchMoverRZML.new(:io => fixture)
    trackers = parser.to_a
    
    assert_equal 2048, parser.width
    assert_equal 1152, parser.height
    
    assert_equal 2, trackers.length
    t = trackers[0]
    
    assert_equal 0, trackers[0][0].frame
    assert_equal 1, trackers[0][1].frame
    
    assert_in_delta 626.7, trackers[0][0].abs_x, DELTA
    assert_in_delta 663.4, trackers[0][0].abs_y, DELTA
  end
  
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
tracksperanto-3.2.2 test/import/test_match_mover_rzml_import.rb
tracksperanto-3.2.1 test/import/test_match_mover_rzml_import.rb
tracksperanto-3.2.0 test/import/test_match_mover_rzml_import.rb
tracksperanto-3.1.0 test/import/test_match_mover_rzml_import.rb
tracksperanto-3.0.1 test/import/test_match_mover_rzml_import.rb
tracksperanto-3.0.0 test/import/test_match_mover_rzml_import.rb
tracksperanto-2.12.0 test/import/test_match_mover_rzml_import.rb
tracksperanto-2.11.3 test/import/test_match_mover_rzml_import.rb
tracksperanto-2.11.2 test/import/test_match_mover_rzml_import.rb
tracksperanto-2.11.1 test/import/test_match_mover_rzml_import.rb
tracksperanto-2.11.0 test/import/test_match_mover_rzml_import.rb
tracksperanto-2.10.0 test/import/test_match_mover_rzml_import.rb
tracksperanto-2.9.9 test/import/test_match_mover_rzml_import.rb
tracksperanto-2.9.8 test/import/test_match_mover_rzml_import.rb
tracksperanto-2.9.7 test/import/test_match_mover_rzml_import.rb
tracksperanto-2.9.6 test/import/test_match_mover_rzml_import.rb
tracksperanto-2.9.5 test/import/test_match_mover_rzml_import.rb
tracksperanto-2.9.4 test/import/test_match_mover_rzml_import.rb