Skip to content

Commit

Permalink
small change to fusiontree tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutho committed Sep 12, 2024
1 parent d6580d3 commit da6e3c5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/fusiontrees.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ ti = time()
out = ntuple(n -> randsector(I), N)
isdual = ntuple(n -> rand(Bool), N)
in = rand(collect((out...)))
numtrees = count(n -> true, fusiontrees(out, in, isdual))
numtrees = length(fusiontrees(out, in, isdual))
@test numtrees == count(n -> true, fusiontrees(out, in, isdual))
while !(0 < numtrees < 30)
out = ntuple(n -> randsector(I), N)
in = rand(collect((out...)))
numtrees = count(n -> true, fusiontrees(out, in, isdual))
numtrees = length(fusiontrees(out, in, isdual))
@test numtrees == count(n -> true, fusiontrees(out, in, isdual))
end
it = @constinferred fusiontrees(out, in, isdual)
@constinferred Nothing iterate(it)
f = @constinferred first(it)
f, s = iterate(it)
@constinferred Nothing iterate(it, s)
@test f == @constinferred first(it)
@testset "Fusion tree $Istr: printing" begin
@test eval(Meta.parse(sprint(show, f))) == f
end
Expand Down

0 comments on commit da6e3c5

Please sign in to comment.