...
1 package zeronull_test
2
3 import (
4 "testing"
5
6 "github.com/jackc/pgtype/testutil"
7 "github.com/jackc/pgtype/zeronull"
8 )
9
10 func TestTextTranscode(t *testing.T) {
11 testutil.TestSuccessfulTranscode(t, "text", []interface{}{
12 (zeronull.Text)("foo"),
13 (zeronull.Text)(""),
14 })
15 }
16
17 func TestTextConvertsGoZeroToNull(t *testing.T) {
18 testutil.TestGoZeroToNullConversion(t, "text", (zeronull.Text)(""))
19 }
20
21 func TestTextConvertsNullToGoZero(t *testing.T) {
22 testutil.TestNullToGoZeroConversion(t, "text", (zeronull.Text)(""))
23 }
24
View as plain text