Skip to content

Commit 846844b

Browse files
committed
fix tests
1 parent afb79d6 commit 846844b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

test/test_linear_algebra.jl

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ using BlockArrays: BlockArrays
55

66
using BlockSparseArrays: BlockSparseArrays
77
using FusionTensors: FusionTensor, to_fusiontensor
8-
using GradedArrays: SU2, TrivialSector, U1, dual, gradedrange
8+
using GradedArrays: O2, SU2, TrivialSector, U1, dual, gradedrange
99

1010
include("setup.jl")
1111

@@ -20,15 +20,15 @@ include("setup.jl")
2020

2121
g0 = gradedrange([TrivialSector() => 2])
2222
gu1 = gradedrange([U1(1) => 1, U1(-1) => 1])
23+
go2 = gradedrange([O2(1 / 2) => 1])
2324
gsu2 = gradedrange([SU2(1 / 2) => 1])
2425

25-
for g in [g0, gu1, gsu2]
26+
for g in [g0, gu1, go2, gsu2]
2627
ft = to_fusiontensor(sdst, (g, g), (dual(g), dual(g)))
2728
@test isnothing(check_sanity(ft))
2829
@test norm(ft) 3 / 2
2930
@test norm(ft, 2) 3 / 2
3031
@test norm(ft, 2.0) 3 / 2
31-
@test norm(ft, 1) 1.5
3232
@test isapprox(tr(ft), 0; atol=eps(Float64))
3333

3434
ft2 = normalize(ft)
@@ -38,4 +38,13 @@ include("setup.jl")
3838
normalize!(ft)
3939
@test norm(ft) 1.0
4040
end
41+
42+
for g in [g0, gu1]
43+
ft = to_fusiontensor(sdst, (g, g), (dual(g), dual(g)))
44+
@test norm(ft, 1) 2.0
45+
end
46+
for g in [go2, gsu2]
47+
ft = to_fusiontensor(sdst, (g, g), (dual(g), dual(g)))
48+
@test norm(ft, 1) 1.5
49+
end
4150
end

0 commit comments

Comments
 (0)