1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-01 19:45:24 +00:00
v2fly/common/serial/string_list_json_test.go
2016-05-24 21:55:46 +02:00

21 lines
369 B
Go

// +build json
package serial_test
import (
"encoding/json"
"testing"
. "github.com/v2ray/v2ray-core/common/serial"
"github.com/v2ray/v2ray-core/testing/assert"
)
func TestStringListUnmarshalError(t *testing.T) {
assert := assert.On(t)
rawJson := `1234`
list := new(StringTList)
err := json.Unmarshal([]byte(rawJson), list)
assert.Error(err).IsNotNil()
}