diff --git a/test/fixed.jl b/test/fixed.jl index 5536de81..8a69bf95 100644 --- a/test/fixed.jl +++ b/test/fixed.jl @@ -712,7 +712,13 @@ end @test @inferred(promote_type(Float32, Int, Q0f7)) === Float32 @test @inferred(promote_type(Float32, Q0f7, Int)) === Float32 - @test @inferred(promote_type(Q0f7,Q1f6,Q2f5,Q3f4,Q4f3,Q5f2)) == Fixed{Int128,7} + if promote_type(Int, Float32, Complex{Int}, typeof(pi)) === ComplexF64 + # right-to-left + @test @inferred(promote_type(Q0f7, Q1f6, Q2f5, Q3f4, Q4f3, Q5f2)) == Fixed{Int128,7} + else + # left-to-right + @test @inferred(promote_type(Q5f2, Q4f3, Q3f4, Q2f5, Q1f6, Q0f7)) == Fixed{Int128,7} + end @test @inferred(promote_type(Q0f7, N0f32)) === Float64 end diff --git a/test/normed.jl b/test/normed.jl index ef33d05a..3a0708bf 100644 --- a/test/normed.jl +++ b/test/normed.jl @@ -685,7 +685,13 @@ end @test @inferred(promote_type(Float32, Int, N0f8)) === Float32 @test @inferred(promote_type(Float32, N0f8, Int)) === Float32 - @test @inferred(promote_type(N0f8,N1f7,N2f6,N3f5,N4f4,N5f3)) === Normed{UInt128,8} + if promote_type(Int, Float32, Complex{Int}, typeof(pi)) === ComplexF64 + # right-to-left + @test @inferred(promote_type(N0f8, N1f7, N2f6, N3f5, N4f4, N5f3)) === Normed{UInt128,8} + else + # left-to-right + @test @inferred(promote_type(N5f3, N4f4, N3f5, N2f6, N1f7, N0f8)) === Normed{UInt128,8} + end @test @inferred(promote_type(N0f8, Q0f31)) === Float64 end