Skip to content

Commit 5b23c20

Browse files
authored
Merge pull request #5 from Vinovest/mj/cleanup-skipped-test
remove skipped tests
2 parents a94dbdc + c0c17d6 commit 5b23c20

2 files changed

Lines changed: 0 additions & 83 deletions

File tree

sqlx_context_test.go

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ package sqlx
1212
import (
1313
"context"
1414
"database/sql"
15-
"encoding/json"
1615
"fmt"
1716
"log"
1817
"strings"
@@ -1164,47 +1163,6 @@ func TestEmbeddedMapsContext(t *testing.T) {
11641163
})
11651164
}
11661165

1167-
func TestIssue197Context(t *testing.T) {
1168-
// this test actually tests for a bug in database/sql:
1169-
// https://github.com/golang/go/issues/13905
1170-
// this potentially makes _any_ named type that is an alias for []byte
1171-
// unsafe to use in a lot of different ways (basically, unsafe to hold
1172-
// onto after loading from the database).
1173-
t.Skip()
1174-
1175-
type mybyte []byte
1176-
type Var struct{ Raw json.RawMessage }
1177-
type Var2 struct{ Raw []byte }
1178-
type Var3 struct{ Raw mybyte }
1179-
RunWithSchemaContext(context.Background(), defaultSchema, t, func(ctx context.Context, db *DB, t *testing.T) {
1180-
var err error
1181-
var v, q Var
1182-
if err = db.GetContext(ctx, &v, `SELECT '{"a": "b"}' AS raw`); err != nil {
1183-
t.Fatal(err)
1184-
}
1185-
if err = db.GetContext(ctx, &q, `SELECT 'null' AS raw`); err != nil {
1186-
t.Fatal(err)
1187-
}
1188-
1189-
var v2, q2 Var2
1190-
if err = db.GetContext(ctx, &v2, `SELECT '{"a": "b"}' AS raw`); err != nil {
1191-
t.Fatal(err)
1192-
}
1193-
if err = db.GetContext(ctx, &q2, `SELECT 'null' AS raw`); err != nil {
1194-
t.Fatal(err)
1195-
}
1196-
1197-
var v3, q3 Var3
1198-
if err = db.QueryRowContext(ctx, `SELECT '{"a": "b"}' AS raw`).Scan(&v3.Raw); err != nil {
1199-
t.Fatal(err)
1200-
}
1201-
if err = db.QueryRowContext(ctx, `SELECT '{"c": "d"}' AS raw`).Scan(&q3.Raw); err != nil {
1202-
t.Fatal(err)
1203-
}
1204-
t.Fail()
1205-
})
1206-
}
1207-
12081166
func TestInContext(t *testing.T) {
12091167
// some quite normal situations
12101168
type tr struct {

sqlx_test.go

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,47 +1460,6 @@ func TestEmbeddedMaps(t *testing.T) {
14601460
})
14611461
}
14621462

1463-
func TestIssue197(t *testing.T) {
1464-
// this test actually tests for a bug in database/sql:
1465-
// https://github.com/golang/go/issues/13905
1466-
// this potentially makes _any_ named type that is an alias for []byte
1467-
// unsafe to use in a lot of different ways (basically, unsafe to hold
1468-
// onto after loading from the database).
1469-
t.Skip()
1470-
1471-
type mybyte []byte
1472-
type Var struct{ Raw json.RawMessage }
1473-
type Var2 struct{ Raw []byte }
1474-
type Var3 struct{ Raw mybyte }
1475-
RunWithSchema(defaultSchema, t, func(db *DB, t *testing.T, now string) {
1476-
var err error
1477-
var v, q Var
1478-
if err = db.Get(&v, `SELECT '{"a": "b"}' AS raw`); err != nil {
1479-
t.Fatal(err)
1480-
}
1481-
if err = db.Get(&q, `SELECT 'null' AS raw`); err != nil {
1482-
t.Fatal(err)
1483-
}
1484-
1485-
var v2, q2 Var2
1486-
if err = db.Get(&v2, `SELECT '{"a": "b"}' AS raw`); err != nil {
1487-
t.Fatal(err)
1488-
}
1489-
if err = db.Get(&q2, `SELECT 'null' AS raw`); err != nil {
1490-
t.Fatal(err)
1491-
}
1492-
1493-
var v3, q3 Var3
1494-
if err = db.QueryRow(`SELECT '{"a": "b"}' AS raw`).Scan(&v3.Raw); err != nil {
1495-
t.Fatal(err)
1496-
}
1497-
if err = db.QueryRow(`SELECT '{"c": "d"}' AS raw`).Scan(&q3.Raw); err != nil {
1498-
t.Fatal(err)
1499-
}
1500-
t.Fail()
1501-
})
1502-
}
1503-
15041463
type Valuer struct {
15051464
Val string
15061465
}

0 commit comments

Comments
 (0)