Skip to content

Commit 686019e

Browse files
authored
promotion tests added
1 parent e9e938b commit 686019e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/runtests.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,3 +342,13 @@ end
342342
@test -zero(Float8) == sign(-zero(Float8))
343343
@test -zero(Float8_4) == sign(-zero(Float8_4))
344344
end
345+
346+
@testset "Promotion" begin
347+
@test Float8(2)*Float16(2) == Float16(4)
348+
@test Float8(2)*Float32(2) == Float32(4)
349+
@test Float8(2)*Float64(2) == Float64(4)
350+
351+
@test true*Float8(2) == Float8(2)
352+
@test false*Float8(2) == zero(Float8)
353+
@test 2*Float8(2) == Float8(4)
354+
end

0 commit comments

Comments
 (0)