fix test break

pull/168/head
v2ray 2016-05-23 20:32:08 +02:00
parent 50957b9973
commit bbdc692a93
2 changed files with 5 additions and 5 deletions

View File

@ -11,18 +11,18 @@ import (
"github.com/v2ray/v2ray-core/testing/assert" "github.com/v2ray/v2ray-core/testing/assert"
) )
func TestInvalidStringLiteralJson(t *testing.T) { func TestInvalidStringTJson(t *testing.T) {
v2testing.Current(t) v2testing.Current(t)
var s StringLiteral var s StringT
err := json.Unmarshal([]byte("1"), &s) err := json.Unmarshal([]byte("1"), &s)
assert.Error(err).IsNotNil() assert.Error(err).IsNotNil()
} }
func TestStringLiteralParsing(t *testing.T) { func TestStringTParsing(t *testing.T) {
v2testing.Current(t) v2testing.Current(t)
var s StringLiteral var s StringT
err := json.Unmarshal([]byte("\"1\""), &s) err := json.Unmarshal([]byte("\"1\""), &s)
assert.Error(err).IsNil() assert.Error(err).IsNil()
assert.String(s).Equals("1") assert.String(s).Equals("1")

View File

@ -15,7 +15,7 @@ func TestStringListUnmarshalError(t *testing.T) {
v2testing.Current(t) v2testing.Current(t)
rawJson := `1234` rawJson := `1234`
list := new(StringLiteralList) list := new(StringTList)
err := json.Unmarshal([]byte(rawJson), list) err := json.Unmarshal([]byte(rawJson), list)
assert.Error(err).IsNotNil() assert.Error(err).IsNotNil()
} }