(t *testing.T)
| 60 | } |
| 61 | |
| 62 | func TestInput_BooleanError(t *testing.T) { |
| 63 | strs := []string{"invalid", "-1", ""} |
| 64 | for _, s := range strs { |
| 65 | t.Run(s, func(t *testing.T) { |
| 66 | defer func() { |
| 67 | if err := recover(); err == nil { |
| 68 | t.Errorf("Error expected") |
| 69 | } |
| 70 | }() |
| 71 | val := New(s).Boolean() |
| 72 | t.Errorf("Expected: to panic but got: %v", val) |
| 73 | }) |
| 74 | } |
| 75 | |
| 76 | } |
| 77 | |
| 78 | func TestInput_CamelCase(t *testing.T) { |
| 79 | str := New("Camel case this_complicated__string%%") |