MCPcopy
hub / github.com/pterm/pterm / TestProgressbarPrinter_AddTotalEqualsCurrent

Function TestProgressbarPrinter_AddTotalEqualsCurrent

progressbar_printer_test.go:49–57  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestProgressbarPrinter_AddTotalEqualsCurrent(t *testing.T) {
50 proxyToDevNull()
51 p := pterm.DefaultProgressbar.WithTotal(1)
52 p.Start()
53 p.Add(1)
54 testza.AssertEqual(t, 1, p.Current)
55 testza.AssertFalse(t, p.IsActive)
56 p.Stop()
57}
58
59func TestProgressbarPrinter_RemoveWhenDone(t *testing.T) {
60 proxyToDevNull()

Callers

nothing calls this directly

Calls 5

proxyToDevNullFunction · 0.85
WithTotalMethod · 0.80
StartMethod · 0.45
AddMethod · 0.45
StopMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…