id_test.go 430 B

123456789101112131415161718
  1. package vmess_test
  2. import (
  3. "testing"
  4. "github.com/v2ray/v2ray-core/common/uuid"
  5. "github.com/v2ray/v2ray-core/common/serial"
  6. . "github.com/v2ray/v2ray-core/proxy/vmess"
  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.BytesLiteral(id.CmdKey()).AllZero()).IsFalse()
  14. }