Files
foundation/mirror/reflection_test.go
Paul Lorenz 95a4bfc777 Update to 2.0
* move util up a level
* rename common to versions
* remove pfxlog from versions
* remove neatcat and echo server
* move udp code to transport
* remove agent, identity and metrics, which have been split out
* remove config which was unused
2022-06-30 13:33:41 -04:00

28 lines
492 B
Go

package mirror
import (
"github.com/stretchr/testify/require"
"testing"
)
type testFieldStruct struct {
name string
subField *testFieldStruct
}
type testType struct {
Foo *testFieldStruct
}
func TestInitializeStructField(t *testing.T) {
testStruct := &testType{}
err := InitializeStructField(testStruct, "Foo")
req := require.New(t)
req.NoError(err)
req.NotNil(testStruct)
req.NotNil(testStruct.Foo)
req.Equal("", testStruct.Foo.name)
req.Nil(testStruct.Foo.subField)
}