You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
235 B
21 lines
235 B
2 years ago
|
package confm
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestInstance(t *testing.T) {
|
||
|
m1 := Get()
|
||
|
m2 := Get()
|
||
|
if m1 != m2 {
|
||
|
t.Error("no singleton")
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func BenchmarkInstance(b *testing.B) {
|
||
|
for i := 0; i < b.N; i++ {
|
||
|
//New()
|
||
|
Get()
|
||
|
}
|
||
|
}
|