Skip to content

Commit

Permalink
Add test for type stability using @inferred
Browse files Browse the repository at this point in the history
  • Loading branch information
Seelengrab committed Aug 13, 2023
1 parent ce55fea commit 928eb43
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -406,4 +406,12 @@ const numTypes = union(getSubtypes(Integer), getSubtypes(AbstractFloat))
end == 2
end
end
@testset "Inference" begin
@testset for gen in (
itype(Int8), PropCheck.iposint(Int8), PropCheck.inegint(Int8),
PropCheck.ifloat(Float16), PropCheck.ifloatinf(Float16), PropCheck.ifloatnan(Float16),
)
@test @inferred(generate(gen)) isa PropCheck.Tree
end
end
end

0 comments on commit 928eb43

Please sign in to comment.