Sha256: 383bda98aa4dccb6843d3057b2942b4fb83216dba89a405088a9b1a5eb82dc55

Contents?: true

Size: 955 Bytes

Versions: 41

Compression:

Stored size: 955 Bytes

Contents

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

class Equalizer3ImportTest < Test::Unit::TestCase
  DELTA = 0.001
  
  def test_introspects_properly
    i = Tracksperanto::Import::Equalizer3
    assert_equal "3DE v3 point export file", i.human_name
    assert i.autodetects_size?
  end

  
  def test_parsing_from_importable
    fixture = File.open(File.dirname(__FILE__) + '/samples/3de_v3/3de_export_v3.txt')
    
    parser = Tracksperanto::Import::Equalizer3.new(:io => fixture)
    trackers = parser.to_a
    
    assert_equal 2048, parser.width
    assert_equal 778, parser.height
    
    assert_equal 39, trackers.length
    
    first_t = trackers[0]
    assert_equal "03", first_t.name
    assert_equal 43, first_t.length
    
    first_kf = first_t[0]
    assert_equal 22, first_kf.frame
    assert_in_delta 71.7889, first_kf.abs_x, DELTA
    assert_in_delta 481.708, first_kf.abs_y, DELTA
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

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