Sha256: c1b26adce50ac68d6c907c706b5a75392e998aea1bd880a1f0a95ec13bc7b762

Contents?: true

Size: 886 Bytes

Versions: 3

Compression:

Stored size: 886 Bytes

Contents

require File.dirname(__FILE__) + '/../helper'

class EqualizerImportTest < Test::Unit::TestCase
  DELTA = 0.001
  
  def test_introspects_properly
    i = Tracksperanto::Import::Equalizer
    assert_equal "3DE point export file", i.human_name
    assert !i.autodetects_size?
  end
  
  def test_parsing_from_importable
    fixture = File.open(File.dirname(__FILE__) + '/samples/3de_export_cube.txt')
    
    parser = Tracksperanto::Import::Equalizer.new
    parser.width = 1024
    parser.height = 512
    
    trackers = parser.parse(fixture)
    assert_equal 8, trackers.length
    
    first_t = trackers[0]
    assert_equal "01", first_t.name
    assert_equal 61, first_t.length
    
    first_kf = first_t[0]
    assert_in_delta 407.384758225105315, first_kf.abs_x, DELTA
    assert_in_delta 232.449011732690479, first_kf.abs_y, DELTA
    assert_equal 39, first_kf.frame
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tracksperanto-1.4.0 test/import/test_3de_import.rb
tracksperanto-1.3.1 test/import/test_3de_import.rb
tracksperanto-1.3.0 test/import/test_3de_import.rb