Sha256: d99693e5aa2bf0814ebcdc05dead86cc04e514c933d77724529ca8c3546e8aaf

Contents?: true

Size: 1.07 KB

Versions: 10

Compression:

Stored size: 1.07 KB

Contents

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

class LerpMiddlewareTest < Test::Unit::TestCase
  
  def test_action_description
    assert_equal "Interpolate missing keyframes of all the trackers", Tracksperanto::Middleware::Lerp.action_description
  end
  
  def test_lerp
    receiver = flexmock
    m = Tracksperanto::Middleware::Lerp.new(receiver)
    receiver.should_receive(:start_export).with(720, 576).once
    receiver.should_receive(:start_tracker_segment).with("Foo").once
    receiver.should_receive(:export_point).with(1, 1.0, 2.0, 0).once
    receiver.should_receive(:export_point).with(2, 2.0, 3.0, 0).once
    receiver.should_receive(:export_point).with(3, 3.0, 4.0, 0).once
    receiver.should_receive(:export_point).with(4, 4.0, 5.0, 0).once
    receiver.should_receive(:end_tracker_segment).once
    receiver.should_receive(:end_export).once
    
    m.start_export(720, 576)
    m.start_tracker_segment("Foo")
    m.export_point(1, 1.0, 2.0, 0)
    m.export_point(4, 4.0, 5.0, 0)
    m.end_tracker_segment
    m.end_export
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tracksperanto-2.12.0 test/middleware/test_lerp_middleware.rb
tracksperanto-2.11.3 test/middleware/test_lerp_middleware.rb
tracksperanto-2.11.2 test/middleware/test_lerp_middleware.rb
tracksperanto-2.11.1 test/middleware/test_lerp_middleware.rb
tracksperanto-2.11.0 test/middleware/test_lerp_middleware.rb
tracksperanto-2.10.0 test/middleware/test_lerp_middleware.rb
tracksperanto-2.9.9 test/middleware/test_lerp_middleware.rb
tracksperanto-2.9.8 test/middleware/test_lerp_middleware.rb
tracksperanto-2.9.7 test/middleware/test_lerp_middleware.rb
tracksperanto-2.9.6 test/middleware/test_lerp_middleware.rb