Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use TestItems.jl #153

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SummationByPartsOperators = "9f78cca6-572e-554e-b819-917d2f1cf240"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestItemRunner = "f8b46487-2199-4994-9208-9a1283c18c0a"
TestItems = "1c621080-faea-4a02-84b6-bbd5e436b8fe"

[compat]
Aqua = "0.7, 0.8"
Expand All @@ -15,3 +17,5 @@ Plots = "1.25"
SparseArrays = "1"
SummationByPartsOperators = "0.5.63"
Test = "1"
TestItemRunner = "1"
TestItems = "1"
33 changes: 22 additions & 11 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
using Test

@testset "DispersiveShallowWater.jl" begin
include("test_aqua.jl")
include("test_unit.jl")
include("test_visualization.jl")
include("test_bbm_1d.jl")
include("test_bbm_bbm_1d.jl")
include("test_svaerd_kalisch_1d.jl")
include("test_serre_green_naghdi_1d.jl")
include("test_hyperbolic_serre_green_naghdi_1d.jl")
using TestItems
using TestItemRunner

@run_package_tests

@testsnippet Setup begin
include("test_util.jl")
end

@testsnippet AdditionalImports begin
using SummationByPartsOperators: PeriodicDerivativeOperator,
UniformPeriodicCoupledOperator,
PeriodicUpwindOperators
using SummationByPartsOperators: derivative_order, periodic_derivative_operator,
legendre_derivative_operator,
UniformPeriodicMesh1D, couple_discontinuously,
upwind_operators, couple_continuously,
legendre_second_derivative_operator,
Mattsson2017

using SparseArrays: sparse, SparseMatrixCSC
using OrdinaryDiffEq: solve
end
13 changes: 3 additions & 10 deletions test/test_aqua.jl
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
module TestAqua

using Aqua
using ExplicitImports: check_no_implicit_imports, check_no_stale_explicit_imports
using Test
using DispersiveShallowWater

@testset "Aqua.jl" begin
@testitem "Aqua.jl" setup=[Setup] begin
using Aqua
using ExplicitImports: check_no_implicit_imports, check_no_stale_explicit_imports
Aqua.test_all(DispersiveShallowWater,
ambiguities = false)
@test isnothing(check_no_implicit_imports(DispersiveShallowWater))
@test isnothing(check_no_stale_explicit_imports(DispersiveShallowWater))
end

end #module
Loading
Loading