(t *testing.T)
| 20 | } |
| 21 | |
| 22 | func TestValueRequiredError(t *testing.T) { |
| 23 | err := &ValueRequiredError{ |
| 24 | flag: &Flag{}, |
| 25 | specifiedName: "foo", |
| 26 | specifiedShorthands: "bar", |
| 27 | } |
| 28 | |
| 29 | if err.GetFlag() == nil { |
| 30 | t.Error("Expected GetSpecifiedName to return its flag field, but got nil") |
| 31 | } |
| 32 | if err.GetSpecifiedName() != "foo" { |
| 33 | t.Errorf("Expected GetSpecifiedName to return %q, got %q", "foo", err.GetSpecifiedName()) |
| 34 | } |
| 35 | if err.GetSpecifiedShortnames() != "bar" { |
| 36 | t.Errorf("Expected GetSpecifiedShortnames to return %q, got %q", "bar", err.GetSpecifiedShortnames()) |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | func TestInvalidValueError(t *testing.T) { |
| 41 | expectedCause := errors.New("error") |
nothing calls this directly
no test coverage detected