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:
@@ -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()
|
||||
}
|
||||
|
Reference in New Issue
Block a user