-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Christoph Ortner
committed
Sep 3, 2024
1 parent
202ff91
commit 70e7dfa
Showing
4 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
using AtomsBase | ||
using Unitful | ||
using UnitfulAtomic | ||
using Test | ||
|
||
## | ||
|
||
@testset "ChemicalSpecies" begin | ||
|
||
symbols = [:H, :He, :Li, :Be, :B, :C, :N, :O, :F, :Ne] | ||
nneut = collect(1:10); nneut[1] = 0; nneut[4] = 5; nneut[8] = 7; | ||
for z = 1:10 | ||
@test ChemicalSpecies(symbols[z]) == ChemicalSpecies(z) == ChemicalSpecies(z, nneut[z], 0) | ||
end | ||
|
||
@test ChemicalSpecies(:D) == ChemicalSpecies(1, 1, 0) | ||
@test ChemicalSpecies(:C13) == ChemicalSpecies(6, 7, 0) | ||
|
||
@test atomic_number( UInt(8) ) == 8 | ||
@test atomic_number( Int16(12) ) == 12 | ||
|
||
end |