id_test.go 419 B

123456789101112131415161718
  1. package protocol_test
  2. import (
  3. "testing"
  4. . "github.com/v2ray/v2ray-core/common/protocol"
  5. "github.com/v2ray/v2ray-core/common/serial"
  6. "github.com/v2ray/v2ray-core/common/uuid"
  7. v2testing "github.com/v2ray/v2ray-core/testing"
  8. "github.com/v2ray/v2ray-core/testing/assert"
  9. )
  10. func TestCmdKey(t *testing.T) {
  11. v2testing.Current(t)
  12. id := NewID(uuid.New())
  13. assert.Bool(serial.BytesT(id.CmdKey()).All(0)).IsFalse()
  14. }