Skip to content

Commit

Permalink
Add Aqua; use StatsBase; isolate some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffFessler committed May 21, 2024
1 parent ded0374 commit 1a9e9da
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
3 changes: 2 additions & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
@@ -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"
9 changes: 9 additions & 0 deletions test/aqua.jl
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions test/expm.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 7 additions & 0 deletions test/matlab.jl
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
7 changes: 4 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -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")
Expand Down

0 comments on commit 1a9e9da

Please sign in to comment.