(t *testing.T)
| 37 | } |
| 38 | |
| 39 | func TestNumeric(t *testing.T) { |
| 40 | n := Value{Numeric([]byte("1234"))} |
| 41 | b := bytes.NewBuffer(nil) |
| 42 | n.EncodeSql(b) |
| 43 | if b.String() != "1234" { |
| 44 | t.Errorf("Expecting 1234, got %s", b.String()) |
| 45 | } |
| 46 | n.EncodeAscii(b) |
| 47 | if b.String() != "12341234" { |
| 48 | t.Errorf("Expecting 12341234, got %s", b.String()) |
| 49 | } |
| 50 | js, err := n.MarshalJSON() |
| 51 | if err != nil { |
| 52 | t.Errorf("Unexpected error: %s", err) |
| 53 | } |
| 54 | if string(js) != "1234" { |
| 55 | t.Errorf("Expecting 1234, received %s", js) |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | func TestTime(t *testing.T) { |
| 60 | date := time.Date(1999, 1, 2, 3, 4, 5, 0, time.UTC) |
nothing calls this directly
no test coverage detected