test/import/test_nuke_import.rb in tracksperanto-2.9.9 vs test/import/test_nuke_import.rb in tracksperanto-2.10.0

- old
+ new

@@ -32,10 +32,24 @@ assert_equal 5, trackers.length assert_equal 128, trackers[0].length end + def test_parsing_planar_tracker + fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/planar.nk') + + parser = Tracksperanto::Import::NukeScript.new(:io => fixture) + parser.width = 4096 + parser.height = 2304 + + trackers = parser.to_a + assert_equal 4, trackers.length + + ref_names = %w( PlanarTracker2_outputBottomLeft PlanarTracker2_outputBottomRight + PlanarTracker2_outputTopRight PlanarTracker2_outputTopLeft ) + assert_equal ref_names, trackers.map{|e| e.name } + end def test_parsing_from_nuke fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/one_tracker_with_break.nk') parser = Tracksperanto::Import::NukeScript.new(:io => fixture) @@ -118,9 +132,10 @@ assert_kind_of Array, result assert_equal 13, result.length assert_equal 742, result[0][0] assert_equal 754, result[7][0] end + def test_zip_channels tuples_x = [[1, 125], [3, 234], [5, 456], [9,876]] tuples_y = [[2, 437], [3, 123], [6, 432], [9, 430]] result = Tracksperanto::Import::NukeScript.new(:io => StringIO.new).send(:zip_curve_tuples, tuples_x, tuples_y)