File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ end # module TestingTypeUtilsWithoutExtensions
1515module TestingTypeUtils
1616
1717using TypeUtils
18- using TypeUtils: BareNumber, BIT_INTEGERS
18+ using TypeUtils: BareNumber, BIT_INTEGERS, Unsupported
1919using Unitful
2020using OffsetArrays
2121using Test
@@ -89,7 +89,12 @@ same_value_and_type(x::T, y::T) where {T} = (x === y) || (x == y)
8989@testset " TypeUtils" begin
9090 @testset " Miscellaneous" begin
9191 # Check that TypeUtils.Unsupported cannot be instantiated.
92- @test_throws Exception TypeUtils. Unsupported ()
92+ @test_throws Exception Unsupported ()
93+ @test Union{Real,Unsupported} < : @inferred Unsupported (Real)
94+ f (x:: Unsupported (Integer)) = error (" this method is not yet implemented" )
95+ @test_throws ErrorException f (8 )
96+ f (x:: Integer ) = x + 1
97+ @test f (8 ) == 9
9398 end
9499
95100 @testset " parameterless()" begin
You can’t perform that action at this time.
0 commit comments