You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-15 22:50:24 +02:00
move IndentionStep to config
This commit is contained in:
@ -31,8 +31,9 @@ func Test_writeBytes_should_grow_buffer(t *testing.T) {
|
||||
|
||||
func Test_writeIndention_should_grow_buffer(t *testing.T) {
|
||||
should := require.New(t)
|
||||
stream := NewStream(DEFAULT_CONFIG, nil, 1)
|
||||
stream.IndentionStep = 2
|
||||
newCfg := &Config{IndentionStep: 2}
|
||||
initConfig(newCfg)
|
||||
stream := NewStream(newCfg, nil, 1)
|
||||
stream.WriteVal([]int{1, 2, 3})
|
||||
should.Equal("[\n 1,\n 2,\n 3\n]", string(stream.Buffer()))
|
||||
}
|
||||
|
Reference in New Issue
Block a user