Skip to content

Commit e7b4b44

Browse files
committed
more promotion tests
1 parent f5a1006 commit e7b4b44

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/no_invalidations.jl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,30 @@ end
8181
test_expr(n -> :(Base.promote_rule(::Type{Bool}, ::Type{$n}) = Bool)) &&
8282
test_expr(n -> :(Base.promote_rule(::Type{$n}, ::Type{Bool}) = Bool))
8383
) broken=true
84+
@test (
85+
test_expr(n -> :(Base.promote_rule(::Type{Int8}, ::Type{$n}) = Int8)) &&
86+
test_expr(n -> :(Base.promote_rule(::Type{$n}, ::Type{Int8}) = Int8))
87+
)
88+
@test (
89+
test_expr(n -> :(Base.promote_rule(::Type{UInt8}, ::Type{$n}) = UInt8)) &&
90+
test_expr(n -> :(Base.promote_rule(::Type{$n}, ::Type{UInt8}) = UInt8))
91+
) broken=true
92+
@test (
93+
test_expr(n -> :(Base.promote_rule(::Type{Int16}, ::Type{$n}) = Int16)) &&
94+
test_expr(n -> :(Base.promote_rule(::Type{$n}, ::Type{Int16}) = Int16))
95+
)
96+
@test (
97+
test_expr(n -> :(Base.promote_rule(::Type{UInt16}, ::Type{$n}) = UInt16)) &&
98+
test_expr(n -> :(Base.promote_rule(::Type{$n}, ::Type{UInt16}) = UInt16))
99+
)
100+
@test (
101+
test_expr(n -> :(Base.promote_rule(::Type{Int}, ::Type{$n}) = Int)) &&
102+
test_expr(n -> :(Base.promote_rule(::Type{$n}, ::Type{Int}) = Int))
103+
) broken=true
104+
@test (
105+
test_expr(n -> :(Base.promote_rule(::Type{UInt}, ::Type{$n}) = UInt)) &&
106+
test_expr(n -> :(Base.promote_rule(::Type{$n}, ::Type{UInt}) = UInt))
107+
)
84108
end
85109
@testset "unary functions" begin
86110
@test test_expr(n -> :(Base.zero(::$n) = $n())) broken=true

0 commit comments

Comments
 (0)