Fix test break

This commit is contained in:
V2Ray committed 2015-09-20 00:11:14 +02:00
1 parent 075753c030
commit b40be74b86
15 files changed
+50 -48

No files matched your search

-20
View File
@@ -1,20 +0,0 @@
package protocol
import (
"testing"
"time"
"github.com/v2ray/v2ray-core/testing/unit"
)
func TestGenerateRandomInt64InRange(t *testing.T) {
assert := unit.Assert(t)
base := time.Now().Unix()
delta := 100
for i := 0; i < 100; i++ {
v := GenerateRandomInt64InRange(base, delta)
assert.Int64(v).AtMost(base + int64(delta))
assert.Int64(v).AtLeast(base - int64(delta))
}
}