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

Function TestGenericArrayScanScannerArrayBytes

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

Source from the content-addressed store, hash-verified

985}
986
987func TestGenericArrayScanScannerArrayBytes(t *testing.T) {
988 src, expected, nsa := []byte(`{NULL,abc,"\""}`),
989 [3]sql.NullString{{}, {String: `abc`, Valid: true}, {String: `"`, Valid: true}},
990 [3]sql.NullString{{String: ``, Valid: true}, {}, {}}
991
992 if err := (GenericArray{&nsa}).Scan(src); err != nil {
993 t.Fatalf("Expected no error, got %v", err)
994 }
995 if !reflect.DeepEqual(nsa, expected) {
996 t.Errorf("Expected %v, got %v", expected, nsa)
997 }
998}
999
1000func TestGenericArrayScanScannerArrayString(t *testing.T) {
1001 src, expected, nsa := `{NULL,"\"",xyz}`,

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…