Skip to content

Commit

Permalink
TestBarSmallBytes: use proper SI units
Browse files Browse the repository at this point in the history
  • Loading branch information
edigaryev committed Nov 6, 2023
1 parent 5f5f2f9 commit ba1eaf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions progressbar_test.go
Expand Up @@ -323,14 +323,14 @@ func TestBarSmallBytes(t *testing.T) {
time.Sleep(100 * time.Millisecond)
bar.Add(1000)
}
if !strings.Contains(buf.String(), "8.8 kB/95 MB") {
if !strings.Contains(buf.String(), "9.0 kB/100 MB") {
t.Errorf("wrong string: %s", buf.String())
}
for i := 1; i < 10; i++ {
time.Sleep(10 * time.Millisecond)
bar.Add(1000000)
}
if !strings.Contains(buf.String(), "8.6/95 MB") {
if !strings.Contains(buf.String(), "9.0/100 MB") {
t.Errorf("wrong string: %s", buf.String())
}
}
Expand Down

0 comments on commit ba1eaf1

Please sign in to comment.