Skip to content
Closed
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
33 changes: 32 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,35 @@ end

end

end # module

@testset "Gyrovals Functions" begin
#Create test species
e = Species("electron")
C = Species("12C")
p = Species("proton")

#Test g_spin function
g_spin(e) ≈ 2
g_spin(C) ≈ 2

#Test gyromagnetic_anomaly function
gyromagnetic_anomaly(e) ≈ 2
gyromagnetic_anomaly(C) ≈ 2

g_nucleon(p) ≈ 5.58
end

@testset "Helper Functions" begin
# Create test species
C = Species("12C+")
@test find_superscript(C) == '+'

#Test normalize_superscipt Function
@test normalize_superscripts(C) == '+'

#Test chargeparse function
@test chargeparse(C) == 1

end

end # module
Loading