diff --git a/test/Project.toml b/test/Project.toml index 830a244..d21740b 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,6 +1,7 @@ [deps] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" MAT = "23992714-dd62-5051-b70f-ba57cb901cac" -Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/test/aqua.jl b/test/aqua.jl new file mode 100644 index 0000000..ed70a26 --- /dev/null +++ b/test/aqua.jl @@ -0,0 +1,9 @@ +using BlochSim: BlochSim +import Aqua +using Test: @testset + +@testset "aqua" begin + Aqua.test_ambiguities(BlochSim; broken = true) + Aqua.test_unbound_args(BlochSim; broken = true) + Aqua.test_all(BlochSim; ambiguities = false, unbound_args = false) # todo +end diff --git a/test/expm.jl b/test/expm.jl index 67a23de..431a02b 100644 --- a/test/expm.jl +++ b/test/expm.jl @@ -1,3 +1,12 @@ +using BlochSim: BlochMcConnellMatrix, InstantaneousRF +using BlochSim: ExcitationMatrix, FreePrecessionMatrix +using BlochSim: Magnetization, MagnetizationMC, Spin, SpinMC +using BlochSim: applydynamics!, excite!, freeprecess!, signal +import BlochSim # BlochMcConnellDynamicsMatrix, expm! (etc) +using ForwardDiff: ForwardDiff +import ForwardDiff: derivative, gradient +using Test: @test, @testset + function expm1() T11 = 1 diff --git a/test/matlab.jl b/test/matlab.jl index e27bd5d..0f970d7 100644 --- a/test/matlab.jl +++ b/test/matlab.jl @@ -1,3 +1,10 @@ +# test/matlab.jl + +using StatsBase: mean +using MAT: matread +using BlochSim +using Test: @test, @testset + function testA5b() answer = matread("matlabtestdata/testA5b.mat") diff --git a/test/runtests.jl b/test/runtests.jl index 3c4cefd..74609b0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,10 +1,11 @@ using BlochSim -using ForwardDiff using LinearAlgebra -using MAT -using Statistics using Test +@testset "aqua.jl" begin + include("aqua.jl") +end + @testset "BlochSim.jl" begin include("matlab.jl") include("magnetization.jl")