mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-06 18:28:00 -05:00
21 lines
370 B
Go
21 lines
370 B
Go
// +build json
|
|
|
|
package collect_test
|
|
|
|
import (
|
|
"encoding/json"
|
|
"testing"
|
|
|
|
. "github.com/v2ray/v2ray-core/common/collect"
|
|
"github.com/v2ray/v2ray-core/testing/assert"
|
|
)
|
|
|
|
func TestStringListUnmarshalError(t *testing.T) {
|
|
assert := assert.On(t)
|
|
|
|
rawJson := `1234`
|
|
list := new(StringList)
|
|
err := json.Unmarshal([]byte(rawJson), list)
|
|
assert.Error(err).IsNotNil()
|
|
}
|