mirror of https://github.com/go-gorm/gorm.git
test case for single parameter for Open
This commit is contained in:
parent
0d54677e13
commit
bd513dd580
10
main_test.go
10
main_test.go
|
@ -754,6 +754,16 @@ func TestDdlErrors(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestOpenWithOneParameter(t *testing.T) {
|
||||||
|
db, err := gorm.Open("dialect")
|
||||||
|
if db != nil {
|
||||||
|
t.Error("Open with one parameter returned non nil for db")
|
||||||
|
}
|
||||||
|
if err == nil {
|
||||||
|
t.Error("Open with one parameter returned err as nil")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func BenchmarkGorm(b *testing.B) {
|
func BenchmarkGorm(b *testing.B) {
|
||||||
b.N = 2000
|
b.N = 2000
|
||||||
for x := 0; x < b.N; x++ {
|
for x := 0; x < b.N; x++ {
|
||||||
|
|
Loading…
Reference in New Issue