diff --git a/bar_test.go b/bar_test.go index 202e0fb..42451c0 100644 --- a/bar_test.go +++ b/bar_test.go @@ -63,7 +63,7 @@ till := 30 refiller := "+" - bar := p.Add(int64(total), mpb.NewBarFiller(mpb.BarStyle().Refiller(refiller)), mpb.BarFillerTrim()) + bar := p.New(int64(total), mpb.BarStyle().Refiller(refiller), mpb.BarFillerTrim()) bar.SetRefill(int64(till)) bar.IncrBy(till) @@ -152,7 +152,7 @@ bs.Tip(string(runes[2])) bs.Padding(string(runes[3])) bs.Rbound(string(runes[4])) - bar := p.Add(int64(total), mpb.NewBarFiller(bs), mpb.BarFillerTrim()) + bar := p.New(int64(total), bs, mpb.BarFillerTrim()) for i := 0; i < total; i++ { bar.Increment() diff --git a/draw_test.go b/draw_test.go index 3cb3c0b..db112ba 100644 --- a/draw_test.go +++ b/draw_test.go @@ -767,7 +767,7 @@ var tmpBuf bytes.Buffer for tw, cases := range testSuite { for _, tc := range cases { - s := newTestState(NewBarFiller(tc.style)) + s := newTestState(tc.style.Build()) s.reqWidth = tc.barWidth s.total = tc.total s.current = tc.current @@ -1214,7 +1214,7 @@ var tmpBuf bytes.Buffer for tw, cases := range testSuite { for _, tc := range cases { - s := newTestState(NewBarFiller(tc.style)) + s := newTestState(tc.style.Build()) s.reqWidth = tc.barWidth s.total = tc.total s.current = tc.current @@ -1383,7 +1383,7 @@ var tmpBuf bytes.Buffer for tw, cases := range testSuite { for _, tc := range cases { - s := newTestState(NewBarFiller(tc.style)) + s := newTestState(tc.style.Build()) s.reqWidth = tc.barWidth s.total = tc.total s.current = tc.current