(t *testing.T)
| 438 | } |
| 439 | |
| 440 | func TestBasicSets(t *testing.T) { |
| 441 | b := NewOptions( |
| 442 | 999, |
| 443 | OptionSetWidth(888), |
| 444 | OptionSetRenderBlankState(true), |
| 445 | OptionSetWriter(io.Discard), // suppressing output for this test |
| 446 | ) |
| 447 | |
| 448 | tc := b.config |
| 449 | |
| 450 | if tc.max != 999 { |
| 451 | t.Errorf("Expected %s to be %d, instead I got %d\n%+v", "max", 999, tc.max, b) |
| 452 | } |
| 453 | |
| 454 | if tc.width != 888 { |
| 455 | t.Errorf("Expected %s to be %d, instead I got %d\n%+v", "width", 999, tc.max, b) |
| 456 | } |
| 457 | |
| 458 | if !tc.renderWithBlankState { |
| 459 | t.Errorf("Expected %s to be %t, instead I got %t\n%+v", "renderWithBlankState", true, tc.renderWithBlankState, b) |
| 460 | } |
| 461 | } |
| 462 | |
| 463 | func TestOptionSetTheme(t *testing.T) { |
| 464 | buf := strings.Builder{} |
nothing calls this directly
no test coverage detected
searching dependent graphs…