Skip to content

Commit d4a726f

Browse files
committed
Test cmp for ProgressString
1 parent 2b13ad0 commit d4a726f

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

Project.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
1111
julia = "0.7, 1"
1212

1313
[extras]
14+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1415
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1516

1617
[targets]
17-
test = ["Test"]
18+
test = ["Test", "Random"]

test/test_progress_record.jl

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module TestProgressRecord
2+
3+
using ProgressLogging: Progress, ProgressString
4+
using Random: shuffle!
5+
using Test
6+
using UUIDs: uuid4
7+
8+
@testset "cmp: ProgressString" begin
9+
strings = Any[
10+
let s = string(i)
11+
rand(Bool) ? s : ProgressString(Progress(uuid4(), 0.0; name = s))
12+
end
13+
for i in 10:99
14+
]
15+
shuffle!(strings)
16+
@test string.(sort!(strings)) == string.(10:99)
17+
end
18+
19+
end # module

0 commit comments

Comments
 (0)