(t *testing.T, tt testCase)
| 145 | } |
| 146 | |
| 147 | func testDecodeJSONInterface(t *testing.T, tt testCase) { |
| 148 | t.Helper() |
| 149 | |
| 150 | d := json.NewDecoder(func(options *json.DecoderOptions) { |
| 151 | *options = tt.decoderOptions |
| 152 | }) |
| 153 | if err := d.DecodeJSONInterface(MustJSONUnmarshal(tt.json, !tt.disableJSONNumber), tt.actual); (err != nil) != tt.wantErr { |
| 154 | t.Errorf("DecodeJSONInterface() error = %v, wantErr %v", err, tt.wantErr) |
| 155 | } |
| 156 | |
| 157 | expect := serde.PtrToValue(tt.want) |
| 158 | actual := serde.PtrToValue(tt.actual) |
| 159 | if !reflect.DeepEqual(expect, actual) { |
| 160 | t.Errorf("%v != %v", expect, actual) |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | func cmpBigFloat() func(x big.Float, y big.Float) bool { |
| 165 | return func(x, y big.Float) bool { |
no test coverage detected