(t *testing.T)
| 71 | } |
| 72 | |
| 73 | func (s) TestFromToProto(t *testing.T) { |
| 74 | s := &spb.Status{ |
| 75 | Code: int32(codes.Internal), |
| 76 | Message: "test test test", |
| 77 | Details: []*anypb.Any{{TypeUrl: "foo", Value: []byte{3, 2, 1}}}, |
| 78 | } |
| 79 | |
| 80 | err := FromProto(s) |
| 81 | if got := err.Proto(); !proto.Equal(s, got) { |
| 82 | t.Fatalf("Expected errors to be identical - s: %v got: %v", s, got) |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | func (s) TestFromNilProto(t *testing.T) { |
| 87 | tests := []*Status{nil, FromProto(nil)} |