Skip to content

Commit

Permalink
Add test demonstrating broken multi-arg code-gen
Browse files Browse the repository at this point in the history
  • Loading branch information
lassepe committed Dec 28, 2024
1 parent c089bd7 commit db95edd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/FDTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2164,3 +2164,17 @@ end
@test isnan(h([0.0, 2.0])[1])
@test isapprox(h([1.1, 2.0])[1], 0.11532531756323319)
end

@testitem "multiarg code generation" begin
using FastDifferentiation: FastDifferentiation as FD

x = FD.make_variables(:x, 3)
y = FD.make_variables(:y, 3)
f = x .* y
f_callable = FD.make_function(f, x, y)

x_val = ones(3)
y_val = ones(3)
f_val = f_callable(x_val, y_val)
@test f_val ones(3)
end

0 comments on commit db95edd

Please sign in to comment.