(t *testing.T)
| 38 | } |
| 39 | |
| 40 | func TestInput_BooleanTrue(t *testing.T) { |
| 41 | strs := []string{"on", "On", "yes", "YES", "1", "true"} |
| 42 | for _, s := range strs { |
| 43 | t.Run(s, func(t *testing.T) { |
| 44 | if val := New(s).Boolean(); !val { |
| 45 | t.Errorf("Expected: to be true but got: %v", val) |
| 46 | } |
| 47 | }) |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | func TestInput_BooleanFalse(t *testing.T) { |
| 52 | strs := []string{"off", "Off", "no", "NO", "0", "false"} |