mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
fix test break
This commit is contained in:
parent
50957b9973
commit
bbdc692a93
@ -11,18 +11,18 @@ import (
|
||||
"github.com/v2ray/v2ray-core/testing/assert"
|
||||
)
|
||||
|
||||
func TestInvalidStringLiteralJson(t *testing.T) {
|
||||
func TestInvalidStringTJson(t *testing.T) {
|
||||
v2testing.Current(t)
|
||||
|
||||
var s StringLiteral
|
||||
var s StringT
|
||||
err := json.Unmarshal([]byte("1"), &s)
|
||||
assert.Error(err).IsNotNil()
|
||||
}
|
||||
|
||||
func TestStringLiteralParsing(t *testing.T) {
|
||||
func TestStringTParsing(t *testing.T) {
|
||||
v2testing.Current(t)
|
||||
|
||||
var s StringLiteral
|
||||
var s StringT
|
||||
err := json.Unmarshal([]byte("\"1\""), &s)
|
||||
assert.Error(err).IsNil()
|
||||
assert.String(s).Equals("1")
|
||||
|
@ -15,7 +15,7 @@ func TestStringListUnmarshalError(t *testing.T) {
|
||||
v2testing.Current(t)
|
||||
|
||||
rawJson := `1234`
|
||||
list := new(StringLiteralList)
|
||||
list := new(StringTList)
|
||||
err := json.Unmarshal([]byte(rawJson), list)
|
||||
assert.Error(err).IsNotNil()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user