1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-06 01:05:35 -05:00

remove common/compare package

This commit is contained in:
Darien Raymond
2019-01-07 00:12:04 +01:00
parent 4468c60b95
commit d26700a2fe
16 changed files with 81 additions and 139 deletions

View File

@@ -7,11 +7,11 @@ import (
"testing"
"time"
"github.com/google/go-cmp/cmp"
"v2ray.com/core"
"v2ray.com/core/app/log"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common"
"v2ray.com/core/common/compare"
clog "v2ray.com/core/common/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
@@ -289,8 +289,8 @@ func TestVMessGCM(t *testing.T) {
assert(nBytes, Equals, len(payload))
response := readFrom(conn, time.Second*40, 10240*1024)
if err := compare.BytesEqualWithDetail(response, xor([]byte(payload))); err != nil {
t.Error(err)
if r := cmp.Diff(response, xor([]byte(payload))); r != "" {
t.Error(r)
}
}()
}
@@ -420,8 +420,8 @@ func TestVMessGCMReadv(t *testing.T) {
assert(nBytes, Equals, len(payload))
response := readFrom(conn, time.Second*40, 10240*1024)
if err := compare.BytesEqualWithDetail(response, xor([]byte(payload))); err != nil {
t.Error(err)
if r := cmp.Diff(response, xor([]byte(payload))); r != "" {
t.Error(r)
}
}()
}
@@ -934,8 +934,8 @@ func TestVMessKCP(t *testing.T) {
assert(nBytes, Equals, len(payload))
response := readFrom(conn, time.Minute*2, 10240*1024)
if err := compare.BytesEqualWithDetail(response, xor(payload)); err != nil {
t.Error(err)
if r := cmp.Diff(response, xor(payload)); r != "" {
t.Error(r)
}
}()
}
@@ -1105,8 +1105,8 @@ func TestVMessKCPLarge(t *testing.T) {
assert(nBytes, Equals, len(payload))
response := readFrom(conn, time.Minute*10, 10240*1024)
if err := compare.BytesEqualWithDetail(response, xor(payload)); err != nil {
t.Error(err)
if r := cmp.Diff(response, xor(payload)); r != "" {
t.Error(r)
}
}()
}