1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/libnetwork/internal/caller/caller_test.go
Sebastiaan van Stijn 427ad30c05
libnetwork: remove unused "testutils" imports
Perhaps the testutils package in the past had an `init()` function to set up
specific things, but it no longer has. so these imports were doing nothing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-18 14:20:37 +02:00

51 lines
689 B
Go

package caller
import (
"testing"
)
func fun1() string {
return Name(0)
}
func fun2() string {
return Name(1)
}
func fun3() string {
return fun4()
}
func fun4() string {
return Name(0)
}
func fun5() string {
return fun6()
}
func fun6() string {
return Name(1)
}
func TestCaller(t *testing.T) {
funName := fun1()
if funName != "fun1" {
t.Fatalf("error on fun1 caller %s", funName)
}
funName = fun2()
if funName != "TestCaller" {
t.Fatalf("error on fun2 caller %s", funName)
}
funName = fun3()
if funName != "fun4" {
t.Fatalf("error on fun2 caller %s", funName)
}
funName = fun5()
if funName != "fun5" {
t.Fatalf("error on fun5 caller %s", funName)
}
}