(t *testing.T)
| 985 | } |
| 986 | |
| 987 | func 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 | |
| 1000 | func TestGenericArrayScanScannerArrayString(t *testing.T) { |
| 1001 | src, expected, nsa := `{NULL,"\"",xyz}`, |
nothing calls this directly
no test coverage detected
searching dependent graphs…