(t *testing.T)
| 330 | } |
| 331 | |
| 332 | func TestFloatEncoding(t *testing.T) { |
| 333 | var buf bytes.Buffer |
| 334 | enc := msgpack.NewEncoder(&buf) |
| 335 | enc.UseCompactInts(true) |
| 336 | |
| 337 | for _, test := range floatEncoderTests { |
| 338 | buf.Reset() |
| 339 | |
| 340 | enc.UseCompactFloats(test.compact) |
| 341 | |
| 342 | err := enc.Encode(test.in) |
| 343 | if err != nil { |
| 344 | t.Fatal(err) |
| 345 | } |
| 346 | |
| 347 | s := hex.EncodeToString(buf.Bytes()) |
| 348 | if s != test.wanted { |
| 349 | t.Fatalf("%s != %s (in=%#v)", s, test.wanted, test.in) |
| 350 | } |
| 351 | } |
| 352 | } |
| 353 | |
| 354 | //------------------------------------------------------------------------------ |
| 355 |
nothing calls this directly
no test coverage detected
searching dependent graphs…