diff --git a/stdlib/Test/src/Test.jl b/stdlib/Test/src/Test.jl index c19d131781b8f..b59b7e5554e9c 100644 --- a/stdlib/Test/src/Test.jl +++ b/stdlib/Test/src/Test.jl @@ -674,8 +674,13 @@ function do_broken_test(result::ExecutionResult, orig_expr) # Assume the test is broken and only change if the result is true if isa(result, Returned) value = result.value - if isa(value, Bool) && value - testres = Error(:test_unbroken, orig_expr, value, nothing, result.source) + if isa(value, Bool) + if value + testres = Error(:test_unbroken, orig_expr, value, nothing, result.source) + end + else + # If the result is non-Boolean, this counts as an Error + testres = Error(:test_nonbool, orig_expr, value, nothing, result.source) end end record(get_testset(), testres) diff --git a/test/ccall.jl b/test/ccall.jl index 1fd386fc43203..cf5bb0e2cf947 100644 --- a/test/ccall.jl +++ b/test/ccall.jl @@ -1020,7 +1020,7 @@ end else -@test_broken "cfunction: no support for closures on this platform" +@test_broken "cfunction: no support for closures on this platform" === nothing end diff --git a/test/sets.jl b/test/sets.jl index b52d813623231..19f9fab6506a0 100644 --- a/test/sets.jl +++ b/test/sets.jl @@ -734,8 +734,7 @@ end x = @inferred replace([1, 2], 2=>missing) @test isequal(x, [1, missing]) && x isa Vector{Union{Int, Missing}} - @test_broken @inferred replace([1, missing], missing=>2) - x = replace([1, missing], missing=>2) + x = @inferred replace([1, missing], missing=>2) @test x == [1, 2] && x isa Vector{Int} x = @inferred replace([1, missing], missing=>2, count=1) @test x == [1, 2] && x isa Vector{Union{Int, Missing}} diff --git a/test/subtype.jl b/test/subtype.jl index 23aabf38e4fa1..aec52e8fcfef3 100644 --- a/test/subtype.jl +++ b/test/subtype.jl @@ -2230,7 +2230,7 @@ T46784{B<:Val, M<:AbstractMatrix} = Tuple{<:Union{B, <:Val{<:B}}, M, Union{Abstr (Tuple{Type{T},Array{Union{T,Nothing},N}} where {T,N})) <: Any #issue 35698 - @test_broken typeintersect(Type{Tuple{Array{T,1} where T}}, UnionAll) + @test_broken typeintersect(Type{Tuple{Array{T,1} where T}}, UnionAll) != Union{} #issue 33137 @test_broken (Tuple{Q,Int} where Q<:Int) <: Tuple{T,T} where T