1
0
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:
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"
)
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")

View File

@ -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()
}