test update
Vladimir Bauer
9 years ago
| 7 | 7 | func TestAddBar(t *testing.T) { |
| 8 | 8 | var buf bytes.Buffer |
| 9 | 9 | p := New(nil).SetWidth(60).SetOut(&buf) |
| 10 | count := p.BarsCount() | |
| 10 | count := p.BarCount() | |
| 11 | 11 | if count != 0 { |
| 12 | 12 | t.Errorf("Count want: %q, got: %q\n", 0, count) |
| 13 | 13 | } |
| 14 | 14 | bar := p.AddBar(10) |
| 15 | count = p.BarsCount() | |
| 15 | count = p.BarCount() | |
| 16 | 16 | if count != 1 { |
| 17 | 17 | t.Errorf("Count want: %q, got: %q\n", 0, count) |
| 18 | 18 | } |
| 30 | 30 | t.Error("RemoveBar failure") |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | count := p.BarsCount() | |
| 33 | count := p.BarCount() | |
| 34 | 34 | if count != 0 { |
| 35 | 35 | t.Errorf("Count want: %q, got: %q\n", 0, count) |
| 36 | 36 | } |