Skip to content

Commit a509e2f

Browse files
committed
Fix and test show. Fixes #2.
1 parent 7c0d397 commit a509e2f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/RoundingIntegers.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ Base.flipsign(x::RSigned, y::RSigned) = RInteger(flipsign(Integer(x), Integer(y)
135135
Base.count_ones(x::RInteger) = count_ones(Integer(x))
136136
Base.leading_zeros(x::RInteger) = leading_zeros(Integer(x))
137137
Base.trailing_zeros(x::RInteger) = trailing_zeros(Integer(x))
138+
Base.ndigits0z(x::RInteger) = Base.ndigits0z(Integer(x))
138139

139140
# A few operations preserve the type
140141
-(x::RInteger) = RInteger(-Integer(x))

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ end
6161
@test copysign(r, r) === r
6262
@test unsigned(r) === RUInt(5)
6363
@test hex(r) == "5"
64+
65+
@test string(RInt(7.2)) == "7"
6466
end
6567

6668
@testset "Rounding" begin

0 commit comments

Comments
 (0)