(t *testing.T)
| 176 | } |
| 177 | |
| 178 | func TestAdaptProtoErrors(t *testing.T) { |
| 179 | // If an error type has a proto representation already, |
| 180 | // it will be preserved exactly. |
| 181 | origErr := &errorspb.TestError{} |
| 182 | t.Logf("start err: %# v", pretty.Formatter(origErr)) |
| 183 | |
| 184 | newErr := network(t, origErr) |
| 185 | |
| 186 | tt := testutils.T{T: t} |
| 187 | |
| 188 | // In any case, the library preserves the error message. |
| 189 | tt.CheckEqual(newErr.Error(), origErr.Error()) |
| 190 | |
| 191 | // Moreover, it preserves the entire structure. |
| 192 | tt.CheckDeepEqual(newErr, origErr) |
| 193 | } |
| 194 | |
| 195 | func TestAdaptProtoErrorsWithWrapper(t *testing.T) { |
| 196 | // proto-native error types are preserved exactly |
nothing calls this directly
no test coverage detected
searching dependent graphs…