(t *testing.T)
| 1117 | } |
| 1118 | |
| 1119 | func TestOptionShowTotalFalseDeterminate(t *testing.T) { |
| 1120 | buf := strings.Builder{} |
| 1121 | bar := NewOptions64( |
| 1122 | 100000000, |
| 1123 | OptionShowBytes(true), |
| 1124 | OptionShowCount(), |
| 1125 | OptionSetWidth(10), |
| 1126 | OptionShowTotalBytes(false), |
| 1127 | OptionSetWriter(&buf), |
| 1128 | ) |
| 1129 | |
| 1130 | bar.Add(10000) |
| 1131 | if !strings.Contains(buf.String(), "10 kB, ") { |
| 1132 | t.Errorf("wrong string: %s", buf.String()) |
| 1133 | } |
| 1134 | } |
| 1135 | |
| 1136 | func TestOptionShowTotalFalseIndeterminate(t *testing.T) { |
| 1137 | buf := strings.Builder{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…