Skip to content

Commit

Permalink
Use SafeTestsets, reorganise and fix some tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
michakraus committed Apr 2, 2020
1 parent 90eb973 commit 8ba654f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 10 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
GeometricIntegrators = "dcce2d33-59f6-5b8d-9047-0defad88ae06"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
SymPy = "24249f21-da20-56a4-8eb1-6a02cf4ae2e6"

[compat]
Expand Down
6 changes: 6 additions & 0 deletions test/poincare_invariant_1st_tests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

using PoincareInvariants
using GeometricIntegrators
using GeometricIntegrators.Utils
using Test

6 changes: 6 additions & 0 deletions test/poincare_invariant_1st_unittests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

using PoincareInvariants
using GeometricIntegrators
using GeometricIntegrators.Utils
using Test

9 changes: 6 additions & 3 deletions test/poincare_invariant_2nd_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

using Test


module PoincareInvariant2ndTest

using PoincareInvariants
Expand Down Expand Up @@ -145,12 +148,12 @@ Ia = compute_invariant_analytical()

Jn = compute_canonical_invariant_numerical()

@assert Jn Ia atol=2eps()
@test Jn Ia atol=2eps()


### compute and check noncanonical invariant ###

In, Jn = compute_invariant_numerical()

@assert In Ia atol=2eps()
@assert Jn Ia atol=2eps()
@test In Ia atol=2eps()
@test Jn Ia atol=2eps()
2 changes: 2 additions & 0 deletions test/poincare_invariant_2nd_unittests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

using Test

using ApproxFun
using PoincareInvariants: compute_integral, compute_derivative1, compute_derivative2

Expand Down
12 changes: 5 additions & 7 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

using PoincareInvariants
using GeometricIntegrators
using GeometricIntegrators.Utils
using Test
using SafeTestsets

include("poincare_invariant_1st_tests.jl")
include("poincare_invariant_2nd_unittests.jl")
include("poincare_invariant_2nd_tests.jl")
@safetestset "1st Poincaré Invariant Unit Tests " begin include("poincare_invariant_1st_unittests.jl") end
@safetestset "1st Poincaré Invariant Function Tests " begin include("poincare_invariant_1st_tests.jl") end
@safetestset "2nd Poincaré Invariant Unit Tests " begin include("poincare_invariant_2nd_unittests.jl") end
@safetestset "2nd Poincaré Invariant Function Tests " begin include("poincare_invariant_2nd_tests.jl") end

0 comments on commit 8ba654f

Please sign in to comment.