This commit is contained in:
Lunny Xiao 2020-01-20 13:55:55 +08:00
parent 12c4e66ca1
commit 0c36dd3b6f
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 2 additions and 2 deletions

View File

@ -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
} }