File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
NDTensors/src/lib/SymmetrySectors/test Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 278
278
@test space_isequal ((@inferred fusion_product (SU2 (1 // 2 ), g3)), g4)
279
279
280
280
# test different simple sectors cannot be fused
281
+ @test_throws MethodError Z {2} (0 ) ⊗ U1 (1 )
282
+ @test_throws MethodError SU2 (1 ) ⊗ U1 (1 )
281
283
@test_throws MethodError fusion_product (g1, SU2 (1 ))
282
284
@test_throws MethodError fusion_product (U1 (1 ), g3)
283
285
end
Original file line number Diff line number Diff line change 541
541
end
542
542
end
543
543
544
+ @testset " Mixing implementations" begin
545
+ s1 = SectorProduct (U1 (1 ))
546
+ sA = SectorProduct (; A= U1 (1 ))
547
+
548
+ @test sA != s1
549
+ @test_throws ArgumentError sA < s1
550
+ @test_throws ArgumentError s1 < sA
551
+ @test_throws MethodError s1 ⊗ sA
552
+ @test_throws MethodError sA ⊗ s1
553
+ end
554
+
544
555
@testset " Empty SymmetrySector" begin
545
556
for s in (SectorProduct (()), SectorProduct ((;)))
546
557
@test s == TrivialSector ()
589
600
590
601
@test ! (s < s)
591
602
@test s < SectorProduct (U1 (1 ))
603
+ @test SectorProduct (U1 (- 1 )) < s
592
604
@test s < SectorProduct (; A= U1 (1 ))
593
605
@test s > SectorProduct (; A= U1 (- 1 ))
594
606
@test ! (s < SectorProduct (; A= U1 (0 )))
You can’t perform that action at this time.
0 commit comments