1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-06-25 17:05:23 +00:00
v2fly/common/protocol/id_test.go

18 lines
372 B
Go
Raw Normal View History

package protocol_test
2016-01-20 16:45:50 +00:00
import (
2016-01-21 12:05:16 +00:00
"testing"
2016-01-20 16:45:50 +00:00
. "github.com/v2ray/v2ray-core/common/protocol"
2016-01-21 12:05:16 +00:00
"github.com/v2ray/v2ray-core/common/serial"
"github.com/v2ray/v2ray-core/common/uuid"
"github.com/v2ray/v2ray-core/testing/assert"
2016-01-20 16:45:50 +00:00
)
func TestCmdKey(t *testing.T) {
2016-05-24 19:55:46 +00:00
assert := assert.On(t)
2016-01-20 16:45:50 +00:00
2016-01-21 12:05:16 +00:00
id := NewID(uuid.New())
2016-05-23 18:21:23 +00:00
assert.Bool(serial.BytesT(id.CmdKey()).All(0)).IsFalse()
2016-01-20 16:45:50 +00:00
}