(t *testing.T)
| 64 | } |
| 65 | } |
| 66 | func TestDialectValueWriting(t *testing.T) { |
| 67 | // Test value writing |
| 68 | for _, tc := range []struct { |
| 69 | in value.Value |
| 70 | out string |
| 71 | }{ |
| 72 | {value.NewValue(true), "true"}, |
| 73 | {value.NewValue(22.2), "22.2"}, |
| 74 | {value.NewValue(dateparse.MustParse("2017/08/08")), "\"2017-08-08 00:00:00 +0000 UTC\""}, |
| 75 | {value.NewValue(22), "22"}, |
| 76 | {value.NewValue("world"), `"world"`}, |
| 77 | {value.NewValue(json.RawMessage(`{"name":"world"}`)), `{"name":"world"}`}, |
| 78 | } { |
| 79 | dw := NewDialectWriter('"', '[') |
| 80 | dw.WriteValue(tc.in) |
| 81 | assert.Equal(t, tc.out, dw.String()) |
| 82 | } |
| 83 | } |
nothing calls this directly
no test coverage detected