1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

fix test break

This commit is contained in:
Darien Raymond 2016-12-08 11:08:46 +01:00
parent 7d2cf4c0e0
commit 12bce36693
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -16,8 +16,8 @@ func TestFnvAuth(t *testing.T) {
rand.Read(expectedText)
buffer := make([]byte, 512)
b := fnvAuth.Seal(buffer, nil, expectedText, nil)
b, err := fnvAuth.Open(buffer, nil, b, nil)
b := fnvAuth.Seal(buffer[:0], nil, expectedText, nil)
b, err := fnvAuth.Open(buffer[:0], nil, b, nil)
assert.Error(err).IsNil()
assert.Int(len(b)).Equals(256)
assert.Bytes(b).Equals(expectedText)