Skip to content

Commit

Permalink
Tidy up test utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Robson committed Nov 10, 2021
1 parent 48bee81 commit 9926cf0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/test_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ function test_flatten_interface(x::T; check_inferred::Bool=true) where {T}

# Check that everything infers properly.
check_inferred && @inferred flatten(x)
check_inferred && @inferred unflatten(v)

# Test with different precisions
@testset "Float64" begin
Expand All @@ -54,6 +55,7 @@ function test_flatten_interface(x::T; check_inferred::Bool=true) where {T}

# Check that everything infers properly.
check_inferred && @inferred flatten(Float64, x)
check_inferred && @inferred _unflatten(_v)
end
@testset "Float32" begin
_v, _unflatten = flatten(Float32, x)
Expand All @@ -63,6 +65,7 @@ function test_flatten_interface(x::T; check_inferred::Bool=true) where {T}

# Check that everything infers properly.
check_inferred && @inferred flatten(Float32, x)
check_inferred && @inferred _unflatten(_v)
end
@testset "Float16" begin
_v, _unflatten = flatten(Float16, x)
Expand All @@ -72,6 +75,7 @@ function test_flatten_interface(x::T; check_inferred::Bool=true) where {T}

# Check that everything infers properly.
check_inferred && @inferred flatten(Float16, x)
check_inferred && @inferred _unflatten(_v)
end
end

Expand Down

0 comments on commit 9926cf0

Please sign in to comment.