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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user