fix test
This commit is contained in:
parent
12c4e66ca1
commit
0c36dd3b6f
|
@ -7,8 +7,8 @@ package xorm
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"xorm.io/core"
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
"xorm.io/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
type IDGonicMapper struct {
|
type IDGonicMapper struct {
|
||||||
|
@ -76,7 +76,7 @@ func TestSameMapperID(t *testing.T) {
|
||||||
for _, tb := range tables {
|
for _, tb := range tables {
|
||||||
if tb.Name == "IDSameMapper" {
|
if tb.Name == "IDSameMapper" {
|
||||||
if len(tb.PKColumns()) != 1 || tb.PKColumns()[0].Name != "ID" {
|
if len(tb.PKColumns()) != 1 || tb.PKColumns()[0].Name != "ID" {
|
||||||
t.Fatal(tb)
|
t.Fatalf("tb %s tb.PKColumns() is %d not 1, tb.PKColumns()[0].Name is %s not ID", tb.Name, len(tb.PKColumns()), tb.PKColumns()[0].Name)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue