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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user