MCPcopy Index your code
hub / github.com/aarondl/sqlboiler / TestGenericArrayScanScannerSliceBytes

Function TestGenericArrayScanScannerSliceBytes

types/array_test.go:1035–1046  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1033}
1034
1035func TestGenericArrayScanScannerSliceBytes(t *testing.T) {
1036 src, expected, nss := []byte(`{NULL,abc,"\""}`),
1037 []sql.NullString{{}, {String: `abc`, Valid: true}, {String: `"`, Valid: true}},
1038 []sql.NullString{{String: ``, Valid: true}, {}, {}, {}, {}}
1039
1040 if err := (GenericArray{&nss}).Scan(src); err != nil {
1041 t.Fatalf("Expected no error, got %v", err)
1042 }
1043 if !reflect.DeepEqual(nss, expected) {
1044 t.Errorf("Expected %v, got %v", expected, nss)
1045 }
1046}
1047
1048func BenchmarkGenericArrayScanScannerSliceBytes(b *testing.B) {
1049 var a GenericArray

Callers

nothing calls this directly

Calls 1

ScanMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…