(t *testing.T)
| 56 | } |
| 57 | |
| 58 | func TestExitCodeError(t *testing.T) { |
| 59 | t.Parallel() |
| 60 | |
| 61 | err := NewExitCodeError(42, true) |
| 62 | ec, ok := err.(*ExitCodeError) |
| 63 | if !ok { |
| 64 | t.Fatalf("error type = %T, want *ExitCodeError", err) |
| 65 | } |
| 66 | if ec.Code != 42 || ec.Pause != true { |
| 67 | t.Fatalf("ExitCodeError fields mismatch: %+v", ec) |
| 68 | } |
| 69 | if got := ec.Error(); got != "exit requested" { |
| 70 | t.Fatalf("ExitCodeError.Error() = %q, want %q", got, "exit requested") |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | func TestFormatError(t *testing.T) { |
| 75 | t.Parallel() |
nothing calls this directly
no test coverage detected