Skip to content

Commit 12033c6

Browse files
committed
only test printing length on 1.6 (also relax length for bigfloats)
1 parent 00596e3 commit 12033c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/rand_tangent.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,13 @@ using FiniteDifferences: rand_tangent
8787
@test x + (rand_tangent(x) + rand_tangent(x)) isa typeof(x)
8888
end
8989

90-
@testset "niceness of printing" begin
90+
# Julia 1.6 changed to using Ryu printing algorithm and seems better at printing short
91+
VERSION > v"1.6" && @testset "niceness of printing" begin
9192
for i in 1:50
9293
@test length(string(rand_tangent(1.0))) <= 6
9394
@test length(string(rand_tangent(1.0 + 1.0im))) <= 12
9495
@test length(string(rand_tangent(1f0))) <= 12
95-
@test length(string(rand_tangent(big"1.0"))) <= 8
96+
@test length(string(rand_tangent(big"1.0"))) <= 9
9697
end
9798
end
9899
end

0 commit comments

Comments
 (0)