@@ -1587,18 +1587,14 @@ end
15871587 _lock_conflicts,Threads.nthreads()
15881588 '` , String)))
15891589 @test _lock_conflicts > 0 skip= (_nthreads < 2 ) # can only test if the worker can multithread
1590- end
15911590
1592- # TODO : merge with `@testset "Base/timing.jl"` once https://github.com/JuliaLang/julia/issues/52948 is resolved
1593- @testset " Base/timing.jl2" begin
15941591 # Test the output of `format_bytes()`
15951592 inputs = [(factor * (Int64 (1000 )^ e),binary) for binary in (false ,true ), factor in (1 ,2 ), e in 0 : 6 ][:]
15961593 expected_output = [" 1 byte" , " 1 byte" , " 2 bytes" , " 2 bytes" , " 1000 bytes" , " 1000 bytes" , " 2.000 kB" , " 1.953 KiB" ,
15971594 " 1000.000 kB" , " 976.562 KiB" , " 2.000 MB" , " 1.907 MiB" , " 1000.000 MB" , " 953.674 MiB" ,
15981595 " 2.000 GB" , " 1.863 GiB" , " 1000.000 GB" , " 931.323 GiB" , " 2.000 TB" , " 1.819 TiB" ,
15991596 " 1000.000 TB" , " 909.495 TiB" , " 2.000 PB" , " 1.776 PiB" , " 1000.000 PB" , " 888.178 PiB" ,
16001597 " 2000.000 PB" , " 1776.357 PiB" ]
1601-
16021598 for ((n, binary), expected) in zip (inputs, expected_output)
16031599 @test Base. format_bytes (n; binary) == expected
16041600 end
0 commit comments