(t *testing.T)
| 998 | } |
| 999 | |
| 1000 | func TestGenericArrayScanScannerArrayString(t *testing.T) { |
| 1001 | src, expected, nsa := `{NULL,"\"",xyz}`, |
| 1002 | [3]sql.NullString{{}, {String: `"`, Valid: true}, {String: `xyz`, Valid: true}}, |
| 1003 | [3]sql.NullString{{String: ``, Valid: true}, {}, {}} |
| 1004 | |
| 1005 | if err := (GenericArray{&nsa}).Scan(src); err != nil { |
| 1006 | t.Fatalf("Expected no error, got %v", err) |
| 1007 | } |
| 1008 | if !reflect.DeepEqual(nsa, expected) { |
| 1009 | t.Errorf("Expected %v, got %v", expected, nsa) |
| 1010 | } |
| 1011 | } |
| 1012 | |
| 1013 | func TestGenericArrayScanScannerSliceEmpty(t *testing.T) { |
| 1014 | var nss []sql.NullString |
nothing calls this directly
no test coverage detected
searching dependent graphs…