Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!
Open sidebar
li xuanfeng
net-libp2p
Commits
20988ff7
Commit
20988ff7
authored
3 years ago
by
XinFeng Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix : test package dara fix
parent
42db55e7
master
develop
v1.3.0
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.1.2
v1.1.1
v1.1.0
v1.0.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
datapackage/datapackage_test.go
datapackage/datapackage_test.go
+3
-3
No files found.
datapackage/datapackage_test.go
View file @
20988ff7
...
...
@@ -35,9 +35,9 @@ func TestPackage(t *testing.T) {
//require.True(t, bytes.Equal(pkgBytes3, []byte{10, 9, 47, 95, 116, 101, 115, 116, 105, 110, 103, 18, 40, 31, 139, 8, 0, 0, 0, 0, 0, 4, 255, 0, 12, 0, 243, 255, 72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100, 33, 1, 0, 0, 255, 255, 149, 25, 133, 27, 12, 0, 0, 0, 24, 1}))
pkg3
:=
&
Package
{}
err
=
pkg3
.
FromBytes
(
pkgBytes3
)
require
.
Error
(
t
,
err
)
//
require.Equal(t, TestingPID, pkg3.Protocol())
//
require.True(t, bytes.Equal(payload, pkg3.Payload()))
require
.
Nil
(
t
,
err
)
require
.
Equal
(
t
,
TestingPID
,
pkg3
.
Protocol
())
require
.
True
(
t
,
bytes
.
Equal
(
payload
,
pkg3
.
Payload
()))
}
func
TestPackageToBytesBenchmark
(
t
*
testing
.
T
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment