Skip to content

Commit

Permalink
Include explicit test of Return Types
Browse files Browse the repository at this point in the history
  • Loading branch information
NHDaly committed Feb 11, 2019
1 parent 6727b12 commit 1819dd6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,16 @@ end
@test x ÷ 2one(x) === x ÷ 2 === FD2(x.i ÷ FD2(2).i)
end
end
@testset "return types" begin
@test div(2one(FD2), 3) isa FD2
@test one(FD2) ÷ one(FD2) isa FD2

# Promotion to bigger type
@test one(FD4) ÷ one(FD2) isa FD4
@test one(FD2) ÷ one(FD4) isa FD4

@test one(FD{Int32, 2}) ÷ one(FD{Int64, 6}) isa FD{Int64, 6}
end
end

@testset "abs, sign" begin
Expand Down

0 comments on commit 1819dd6

Please sign in to comment.