Skip to content

Commit

Permalink
Move "Test get_spacegroup_type" from symmetry.jl to dataset.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed Aug 14, 2023
1 parent 5c5a4e9 commit 962c6f7
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 62 deletions.
62 changes: 62 additions & 0 deletions test/dataset.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,65 @@
@testset "Test `get_spacegroup_type`" begin
# Adapted from https://github.com/unkcpz/LibSymspg.jl/blob/53d2f6d/test/test_api.jl#L7-L12
@test get_spacegroup_type(101) == SpacegroupType(
15,
"C2/c",
"I 1 1 2/a",
"C 2/c = I 1 1 2/a",
"C2h^6",
101,
"-I 2a",
"-c3",
"2/m",
"C2h",
8,
"2/mC",
)
@test get_spacegroup_type(419) == SpacegroupType(
136,
"P4_2/mnm",
"P 4_2/m 2_1/n 2/m",
"P 4_2/m n m",
"D4h^14",
419,
"-P 4n 2n",
"",
"4/mmm",
"D4h",
36,
"4/mmmP",
)
@test get_spacegroup_type(1) ==
SpacegroupType(1, "P1", "P 1", "P 1", "C1^1", 1, "P 1", "", "1", "C1", 1, "1P")
@test get_spacegroup_type(525) == SpacegroupType(
227,
"Fd-3m",
"F 4_1/d -3 2/m",
"F d -3 m",
"Oh^7",
525,
"F 4d 2 3 -1d",
"1",
"m-3m",
"Oh",
72,
"m-3mF",
)
@test get_spacegroup_type(485) == SpacegroupType(
191,
"P6/mmm",
"P 6/m 2/m 2/m",
"P 6/m m m",
"D6h^1",
485,
"-P 6 2",
"",
"6/mmm",
"D6h",
58,
"6/mmm",
)
end

# From https://spglib.github.io/spglib/definition.html#computing-rigid-rotation-introduced-by-idealization
@testset "Computing rigid rotation introduced by idealization" begin
lattice = [
Expand Down
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ using Test
@testset "Spglib.jl" begin
# Write your own tests here.
include("cell.jl")
include("symmetry.jl")
include("magnetic.jl")
include("standardize.jl")
include("reciprocal.jl")
Expand Down
61 changes: 0 additions & 61 deletions test/symmetry.jl

This file was deleted.

0 comments on commit 962c6f7

Please sign in to comment.