Skip to content

Commit 007523b

Browse files
committed
Test constructor
1 parent d927bdb commit 007523b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/runtests.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@ end
101101
end
102102
end
103103

104+
@testset "constructor" begin
105+
@testset "invalid $T" for T in CONTAINER_TYPES
106+
f = FixedPointDecimals.max_exp10(T) + 1
107+
@test_throws ArgumentError reinterpret(FD{T,f}, 0)
108+
@test_throws ArgumentError reinterpret(FD{T,-1}, 0)
109+
end
110+
end
111+
104112
@testset "conversion" begin
105113
@testset for x in keyvalues[FD2]
106114
@testset for T in [Rational{Int128}, WFD2, WFD4]

0 commit comments

Comments
 (0)