(t *testing.T)
| 49 | } |
| 50 | |
| 51 | func TestInput_BooleanFalse(t *testing.T) { |
| 52 | strs := []string{"off", "Off", "no", "NO", "0", "false"} |
| 53 | for _, s := range strs { |
| 54 | t.Run(s, func(t *testing.T) { |
| 55 | if val := New(s).Boolean(); val { |
| 56 | t.Errorf("Expected: to be false but got: %v", val) |
| 57 | } |
| 58 | }) |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | func TestInput_BooleanError(t *testing.T) { |
| 63 | strs := []string{"invalid", "-1", ""} |