mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-09 03:37:37 -05:00
22 lines
422 B
Go
22 lines
422 B
Go
|
// +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`
|
||
|
list := new(StringLiteralList)
|
||
|
err := json.Unmarshal([]byte(rawJson), list)
|
||
|
assert.Error(err).IsNotNil()
|
||
|
}
|