test/import/test_shake_catcher.rb in tracksperanto-1.6.5 vs test/import/test_shake_catcher.rb in tracksperanto-1.6.6

- old
+ new

@@ -35,20 +35,36 @@ tree = parse("OuterFunc(InnerFunc(15)", k) assert_equal [[:retval, 300]], tree end + def test_hermite_funcall_with_array_ats + k = Class.new(C) do + def hermite(first_arg, *keyframes) + keyframes + end + end + + tree = parse('Hermite(0,[1379.04,-0.02,-0.02]@1,[1379.04,-0.03,-0.03]@2)', k) + assert_equal [[:retval, [[1379.04, -0.02, -0.02], 1, [1379.04, -0.03, -0.03], 2]]], tree + end + def test_linear_funcall k = Class.new(C) do def linear(first_arg, *keyframes) - keyframes.map do | kf | - [kf[0][1], kf[1][1]] - end + keyframes end end tree = parse('Linear(0,591.702@1,591.452@2,591.202@3,590.733@4,590.202@5,589.421@6,589.249@7)', k) - assert_equal [[:retval, [[591.702, 1], [591.452, 2], [591.202, 3], [590.733, 4], [590.202, 5], [589.421, 6], [589.249, 7]]]], tree + assert_equal [[:retval, + [[[:atom_f, 591.702], [:atom_at_i, 1]], + [[:atom_f, 591.452], [:atom_at_i, 2]], + [[:atom_f, 591.202], [:atom_at_i, 3]], + [[:atom_f, 590.733], [:atom_at_i, 4]], + [[:atom_f, 590.202], [:atom_at_i, 5]], + [[:atom_f, 589.421], [:atom_at_i, 6]], + [[:atom_f, 589.249], [:atom_at_i, 7]]]]], tree end def test_nested_funcalls_with_array_return k = Class.new(C) do def outerfunc(a) \ No newline at end of file