Sha256: ce56ce17a7059b9031a3953eb4c832a219646c9dd8d4aa8fa34d4d0d5d5abc86

Contents?: true

Size: 901 Bytes

Versions: 20

Compression:

Stored size: 901 Bytes

Contents

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

class EqualizerImportTest < Test::Unit::TestCase
  DELTA = 0.001
  
  def test_introspects_properly
    i = Tracksperanto::Import::Equalizer4
    assert_equal "3DE v4 point export file", i.human_name
    assert !i.autodetects_size?
  end
  
  def test_parsing_from_importable
    fixture = File.open(File.dirname(__FILE__) + '/samples/3de_v4/3de_export_cube.txt')
    
    parser = Tracksperanto::Import::Equalizer4.new(:io => fixture, :width => 1024, :height => 512)
    trackers = parser.to_a
    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

20 entries across 20 versions & 1 rubygems

Version Path
tracksperanto-2.8.6 test/import/test_3de_import.rb
tracksperanto-2.8.5 test/import/test_3de_import.rb
tracksperanto-2.8.4 test/import/test_3de_import.rb
tracksperanto-2.8.2 test/import/test_3de_import.rb
tracksperanto-2.8.1 test/import/test_3de_import.rb
tracksperanto-2.8.0 test/import/test_3de_import.rb
tracksperanto-2.7.0 test/import/test_3de_import.rb
tracksperanto-2.6.3 test/import/test_3de_import.rb
tracksperanto-2.6.2 test/import/test_3de_import.rb
tracksperanto-2.6.1 test/import/test_3de_import.rb
tracksperanto-2.6.0 test/import/test_3de_import.rb
tracksperanto-2.5.0 test/import/test_3de_import.rb
tracksperanto-2.4.1 test/import/test_3de_import.rb
tracksperanto-2.3.3 test/import/test_3de_import.rb
tracksperanto-2.3.2 test/import/test_3de_import.rb
tracksperanto-2.3.1 test/import/test_3de_import.rb
tracksperanto-2.3.0 test/import/test_3de_import.rb
tracksperanto-2.2.4 test/import/test_3de_import.rb
tracksperanto-2.2.2 test/import/test_3de_import.rb
tracksperanto-2.2.0 test/import/test_3de_import.rb