mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-27 04:25:44 -05:00
fully migrate to new assertion lib
This commit is contained in:
@@ -5,11 +5,11 @@ import (
|
||||
"time"
|
||||
|
||||
. "v2ray.com/core/common/protocol"
|
||||
"v2ray.com/core/testing/assert"
|
||||
. "v2ray.com/ext/assert"
|
||||
)
|
||||
|
||||
func TestGenerateRandomInt64InRange(t *testing.T) {
|
||||
assert := assert.On(t)
|
||||
assert := With(t)
|
||||
|
||||
base := time.Now().Unix()
|
||||
delta := 100
|
||||
@@ -17,7 +17,7 @@ func TestGenerateRandomInt64InRange(t *testing.T) {
|
||||
|
||||
for i := 0; i < 100; i++ {
|
||||
val := int64(generator())
|
||||
assert.Int64(val).AtMost(base + int64(delta))
|
||||
assert.Int64(val).AtLeast(base - int64(delta))
|
||||
assert(val, AtMost, base + int64(delta))
|
||||
assert(val, AtLeast, base - int64(delta))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user