1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-09-29 21:54:10 -04:00

more json test cases

This commit is contained in:
Darien Raymond
2016-02-04 10:43:04 +00:00
parent be57f48bb3
commit c74bcc9c50
4 changed files with 68 additions and 8 deletions

View File

@@ -30,3 +30,11 @@ func TestStringNetworkList(t *testing.T) {
assert.Bool(list.HasNetwork(Network("tcp"))).IsTrue()
assert.Bool(list.HasNetwork(Network("udp"))).IsFalse()
}
func TestInvalidJson(t *testing.T) {
v2testing.Current(t)
var list NetworkList
err := json.Unmarshal([]byte("0"), &list)
assert.Error(err).IsNotNil()
}