(t *testing.T)
| 64 | } |
| 65 | |
| 66 | func TestUntrusted_jsonRoundTrip(t *testing.T) { |
| 67 | u := NewUntrusted("x\x1b[0m") |
| 68 | b, err := json.Marshal(u) |
| 69 | require.NoError(t, err) |
| 70 | |
| 71 | var back Untrusted |
| 72 | require.NoError(t, json.Unmarshal(b, &back)) |
| 73 | assert.Equal(t, u.Raw(), back.Raw()) |
| 74 | } |
| 75 | |
| 76 | func TestUntrusted_Empty(t *testing.T) { |
| 77 | assert.True(t, NewUntrusted("").Empty()) |
nothing calls this directly
no test coverage detected