Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PerezHz committed Dec 3, 2017
1 parent 478f0f5 commit 7d5d09b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/mixtures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,10 @@ end
Qv = convert.(Taylor1{TaylorN{Float64}}, Pv)

@test jacobian(Pv) == jacobian(Qv)

dx = set_variables("x", numvars=4, order=10)
for i in 1:4
@test deg2rad(180+dx[i]) == pi + deg2rad(1.0)dx[i]
rad2deg(pi+dx[i]) == 180.0+rad2deg(1.0)dx[i]
end
end
5 changes: 5 additions & 0 deletions test/onevariable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,11 @@ end
@test t t
@test t t+sqrt(eps())
@test isapprox(p, q, atol=eps())

t = Taylor1(35)
@test Taylor1([180.0, rad2deg(1.0)], 35) == rad2deg(pi+t)
@test sin(pi/2+deg2rad(1.0)t) == sin(deg2rad(90+t))

end

@testset "Matrix multiplication for Taylor1" begin
Expand Down

0 comments on commit 7d5d09b

Please sign in to comment.