1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-06 09:15:37 -05:00

leveral serial.String in code

This commit is contained in:
Darien Raymond
2015-12-02 15:49:34 +00:00
parent 3c12469ae5
commit 36848af749
4 changed files with 7 additions and 7 deletions

View File

@@ -14,7 +14,7 @@ func TestTCPDestination(t *testing.T) {
dest := v2net.NewTCPDestination(v2net.IPAddress([]byte{1, 2, 3, 4}, 80))
assert.Bool(dest.IsTCP()).IsTrue()
assert.Bool(dest.IsUDP()).IsFalse()
assert.StringLiteral(dest.String()).Equals("tcp:1.2.3.4:80")
assert.String(dest).Equals("tcp:1.2.3.4:80")
}
func TestUDPDestination(t *testing.T) {
@@ -23,5 +23,5 @@ func TestUDPDestination(t *testing.T) {
dest := v2net.NewUDPDestination(v2net.IPAddress([]byte{0x20, 0x01, 0x48, 0x60, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88}, 53))
assert.Bool(dest.IsTCP()).IsFalse()
assert.Bool(dest.IsUDP()).IsTrue()
assert.StringLiteral(dest.String()).Equals("udp:[2001:4860:4860::8888]:53")
assert.String(dest).Equals("udp:[2001:4860:4860::8888]:53")
}