Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pack有问题 #3

Closed
spin6lock opened this issue Jun 15, 2018 · 1 comment
Closed

pack有问题 #3

spin6lock opened this issue Jun 15, 2018 · 1 comment

Comments

@spin6lock
Copy link
Contributor

spin6lock commented Jun 15, 2018

diff --git a/pack_test.go b/pack_test.go
index bce8824..c9b01aa 100644
--- a/pack_test.go
+++ b/pack_test.go

@@ -31,6 +31,11 @@ var packTestCases []*PackTestCase = []*PackTestCase{
                        []byte{0x00, 0x00},
                }, nil),
        },
+       &PackTestCase{
+               Name:     "FFPack2",
+               Unpacked: []byte{0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E,},
+               Packed:   []byte{0xFF, 0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x00, 0x00},
+       },
 }

这个testcase过不了,参见 issue#44

@luxuia
Copy link

luxuia commented Jun 19, 2018

testcase过不了,是因为 pack是不止依赖一个8bytes的,还可能依赖之后的8bytes。 所以拼接后打包和打包后拼接 出来的结果本来就可能是不一致的。

@xjdrew xjdrew closed this as completed in e7239ca Jun 19, 2018
xjdrew added a commit that referenced this issue Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants