(t *testing.T)
| 1033 | } |
| 1034 | |
| 1035 | func 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 | |
| 1048 | func BenchmarkGenericArrayScanScannerSliceBytes(b *testing.B) { |
| 1049 | var a GenericArray |
nothing calls this directly
no test coverage detected
searching dependent graphs…