Skip to content

Commit

Permalink
Relax pgrrec test
Browse files Browse the repository at this point in the history
  • Loading branch information
helgee committed Jan 11, 2019
1 parent 29f59d3 commit 24f1eca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions test/g.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ using Random: randstring
pcpool("pcpool_test", data)
cvals = gcpool("pcpool_test")
@test data == cvals
@test gcpool("norbert") === nothing
finally
kclear()
end
Expand Down
10 changes: 6 additions & 4 deletions test/p.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ using LinearAlgebra: I
rp = radii[3]
f = (re - rp) / re
rectan = pgrrec("Mars", deg2rad(90.0), deg2rad(45), 300, re, f)
expected = [1.604703022312521e-13, -2.620678915e+3, 2.592408909e+3]
@testset for i in eachindex(rectan, expected)
@test rectan[i] expected[i]
end
expected = [1.604650025e-13, -2.620678915e+3, 2.592408909e+3]
@test rectan expected
@test_throws SpiceError pgrrec("norbert", deg2rad(90.0), deg2rad(45), 300, re, f)
@test_throws SpiceError pgrrec("", deg2rad(90.0), deg2rad(45), 300, re, f)
@test_throws SpiceError pgrrec("Mars", deg2rad(90.0), deg2rad(45), 300, -re, f)
@test_throws SpiceError pgrrec("Mars", deg2rad(90.0), deg2rad(45), 300, re, f+1)
finally
kclear()
end
Expand Down

0 comments on commit 24f1eca

Please sign in to comment.