id_test.go 376 B

1234567891011121314151617
  1. package protocol_test
  2. import (
  3. "testing"
  4. "github.com/v2ray/v2ray-core/common/predicate"
  5. . "github.com/v2ray/v2ray-core/common/protocol"
  6. "github.com/v2ray/v2ray-core/common/uuid"
  7. "github.com/v2ray/v2ray-core/testing/assert"
  8. )
  9. func TestCmdKey(t *testing.T) {
  10. assert := assert.On(t)
  11. id := NewID(uuid.New())
  12. assert.Bool(predicate.BytesAll(id.CmdKey(), 0)).IsFalse()
  13. }