N
main.go
context
context_test.go
context.go
Size: a a a
N
AK
AK
$ go version
go version go1.16.3 darwin/amd64
$ go test context/...
ok context 0.494s
AK
~/tmp/nigless/try-go$ cat context/context_test.go
package context
import (
"testing"
"github.com/stretchr/testify/assert"
)
func ModifyChilds(t *testing.T) {
ctx := Context{}
assert.Nil(t, ctx.AddChild(&Context{}), "")
}
AK
~/tmp/nigless/try-go$ cat go.mod
module nigless/try-go
go 1.16
require github.com/stretchr/testify v1.7.0
с
AK
AK
с
func TestModifyChilds(t *testing.T) {
с
func ModifyChilds(t *testing.T) {
с
AK
N
с
с
AK
AK
N
AK