1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-05-14 00:19:07 -04:00

more test cases

This commit is contained in:
Darien Raymond
2017-12-18 00:07:50 +01:00
parent 88b81a0d29
commit a0b2c285b2
3 changed files with 57 additions and 0 deletions

View File

@@ -15,3 +15,13 @@ func TestCmdKey(t *testing.T) {
id := NewID(uuid.New())
assert(predicate.BytesAll(id.CmdKey(), 0), IsFalse)
}
func TestIdEquals(t *testing.T) {
assert := With(t)
id1 := NewID(uuid.New())
id2 := NewID(id1.UUID())
assert(id1.Equals(id2), IsTrue)
assert(id1.String(), Equals, id2.String())
}