change path

This commit is contained in:
YDZ
2020-08-06 22:51:50 +08:00
parent ef3da5d363
commit dfde398a50
253 changed files with 3103 additions and 460 deletions

View File

@@ -0,0 +1,30 @@
package kit
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_NestedInteger(t *testing.T) {
ast := assert.New(t)
n := NestedInteger{}
ast.True(n.IsInteger())
n.SetInteger(1)
ast.Equal(1, n.GetInteger())
elem := NestedInteger{Num: 1}
expected := NestedInteger{
Num: 1,
Ns: []*NestedInteger{&elem},
}
n.Add(elem)
ast.Equal(expected, n)
ast.Equal(expected.Ns, n.GetList())
}