(t *testing.T)
| 400 | } |
| 401 | |
| 402 | func TestNilReceiverContext(t *testing.T) { |
| 403 | RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) { |
| 404 | loadDefaultFixtureContext(ctx, db, t) |
| 405 | var p *Person |
| 406 | err := db.GetContext(ctx, p, "SELECT * FROM person LIMIT 1") |
| 407 | if err == nil { |
| 408 | t.Error("Expected error when getting into nil struct ptr.") |
| 409 | } |
| 410 | var pp *[]Person |
| 411 | err = db.SelectContext(ctx, pp, "SELECT * FROM person") |
| 412 | if err == nil { |
| 413 | t.Error("Expected an error when selecting into nil slice ptr.") |
| 414 | } |
| 415 | }) |
| 416 | } |
| 417 | |
| 418 | func TestNamedQueryContext(t *testing.T) { |
| 419 | var schema = Schema{ |
nothing calls this directly
no test coverage detected