(t *testing.T)
| 636 | } |
| 637 | |
| 638 | func TestReadComplex64Bytes(t *testing.T) { |
| 639 | var buf bytes.Buffer |
| 640 | en := NewWriter(&buf) |
| 641 | |
| 642 | tests := []complex64{complex(0, 0), complex(12.8, 32.0)} |
| 643 | |
| 644 | for i, v := range tests { |
| 645 | buf.Reset() |
| 646 | en.WriteComplex64(v) |
| 647 | en.Flush() |
| 648 | |
| 649 | out, left, err := ReadComplex64Bytes(buf.Bytes()) |
| 650 | if err != nil { |
| 651 | t.Errorf("test case %d: %s", i, err) |
| 652 | } |
| 653 | if len(left) != 0 { |
| 654 | t.Errorf("expected 0 bytes left; found %d", len(left)) |
| 655 | } |
| 656 | if out != v { |
| 657 | t.Errorf("%f in; %f out", v, out) |
| 658 | } |
| 659 | } |
| 660 | } |
| 661 | |
| 662 | func TestReadTimeBytes(t *testing.T) { |
| 663 | var buf bytes.Buffer |
nothing calls this directly
no test coverage detected
searching dependent graphs…