1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-05-09 14:09:07 -04:00

update tests

This commit is contained in:
Darien Raymond
2018-11-15 11:17:20 +01:00
parent ac4f868078
commit 24288a74a2
11 changed files with 48 additions and 50 deletions

View File

@@ -3,9 +3,10 @@ package serial_test
import (
"testing"
"github.com/google/go-cmp/cmp"
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/compare"
"v2ray.com/core/common/serial"
)
@@ -18,7 +19,7 @@ func TestUint32Serial(t *testing.T) {
if n != 4 {
t.Error("expect 4 bytes writtng, but actually ", n)
}
if err := compare.BytesEqualWithDetail(b.Bytes(), []byte{0, 0, 0, 10}); err != nil {
t.Error(err)
if diff := cmp.Diff(b.Bytes(), []byte{0, 0, 0, 10}); diff != "" {
t.Error(diff)
}
}