1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-06 03:54:22 -04:00
v2fly/common/serial/string_list_json_test.go

22 lines
416 B
Go
Raw Normal View History

2016-01-21 18:53:51 -05:00
// +build json
package serial_test
import (
"encoding/json"
"testing"
. "github.com/v2ray/v2ray-core/common/serial"
v2testing "github.com/v2ray/v2ray-core/testing"
"github.com/v2ray/v2ray-core/testing/assert"
)
func TestStringListUnmarshalError(t *testing.T) {
v2testing.Current(t)
rawJson := `1234`
2016-05-23 14:32:08 -04:00
list := new(StringTList)
2016-01-21 18:53:51 -05:00
err := json.Unmarshal([]byte(rawJson), list)
assert.Error(err).IsNotNil()
}