1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-28 13:05:28 -05:00

fully migrate to new assertion lib

This commit is contained in:
Darien Raymond
2017-10-24 16:15:35 +02:00
parent 4a0ca30d08
commit 74cf833758
70 changed files with 974 additions and 942 deletions

View File

@@ -4,11 +4,11 @@ import (
"testing"
. "v2ray.com/core/common/platform"
"v2ray.com/core/testing/assert"
. "v2ray.com/ext/assert"
)
func TestNormalizeEnvName(t *testing.T) {
assert := assert.On(t)
assert := With(t)
cases := []struct {
input string
@@ -28,14 +28,14 @@ func TestNormalizeEnvName(t *testing.T) {
},
}
for _, test := range cases {
assert.String(NormalizeEnvName(test.input)).Equals(test.output)
assert(NormalizeEnvName(test.input), Equals, test.output)
}
}
func TestEnvFlag(t *testing.T) {
assert := assert.On(t)
assert := With(t)
assert.Int(EnvFlag{
assert(EnvFlag{
Name: "xxxxx.y",
}.GetValueAsInt(10)).Equals(10)
}.GetValueAsInt(10), Equals, 10)
}