MCPcopy Index your code
hub / github.com/dropbox/godropbox / TestNumeric

Function TestNumeric

database/sqltypes/sqltypes_test.go:42–53  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

40}
41
42func TestNumeric(t *testing.T) {
43 n := Value{Numeric([]byte("1234"))}
44 b := bytes.NewBuffer(nil)
45 n.EncodeSql(b)
46 if b.String() != "1234" {
47 t.Errorf("Expecting 1234, got %s", b.String())
48 }
49 n.EncodeAscii(b)
50 if b.String() != "12341234" {
51 t.Errorf("Expecting 12341234, got %s", b.String())
52 }
53}
54
55func TestTime(t *testing.T) {
56 date := time.Date(1999, 1, 2, 3, 4, 5, 0, time.UTC)

Callers

nothing calls this directly

Calls 4

EncodeSqlMethod · 0.95
EncodeAsciiMethod · 0.95
NumericTypeAlias · 0.85
StringMethod · 0.65

Tested by

no test coverage detected