mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-10-06 18:51:50 -07:00
remove dependency of assert lib
This commit is contained in:
@@ -4,13 +4,13 @@ import (
|
||||
"crypto/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
|
||||
"v2ray.com/core/common"
|
||||
. "v2ray.com/core/proxy/vmess/encoding"
|
||||
. "v2ray.com/ext/assert"
|
||||
)
|
||||
|
||||
func TestFnvAuth(t *testing.T) {
|
||||
assert := With(t)
|
||||
fnvAuth := new(FnvAuthenticator)
|
||||
|
||||
expectedText := make([]byte, 256)
|
||||
@@ -20,7 +20,8 @@ func TestFnvAuth(t *testing.T) {
|
||||
buffer := make([]byte, 512)
|
||||
b := fnvAuth.Seal(buffer[:0], nil, expectedText, nil)
|
||||
b, err = fnvAuth.Open(buffer[:0], nil, b, nil)
|
||||
assert(err, IsNil)
|
||||
assert(len(b), Equals, 256)
|
||||
assert(b, Equals, expectedText)
|
||||
common.Must(err)
|
||||
if r := cmp.Diff(b, expectedText); r != "" {
|
||||
t.Error(r)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user