mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-17 22:57:10 +00:00
leverage serial.String in assert
This commit is contained in:
1 parent
7960b97c8e
commit
3c12469ae5
11 files changed
+38
-34
No files matched your search
@@ -71,7 +71,7 @@ func TestSocksTcpConnect(t *testing.T) {
|
||||
|
||||
assert.Bytes([]byte(data2Send)).Equals(connOutput.Bytes())
|
||||
assert.Bytes(dataReturned).Equals(connInput)
|
||||
assert.String(targetServer).Equals(och.Destination.Address().String())
|
||||
assert.StringLiteral(targetServer).Equals(och.Destination.Address().String())
|
||||
}
|
||||
|
||||
func TestSocksTcpConnectWithUserPass(t *testing.T) {
|
||||
@@ -129,7 +129,7 @@ func TestSocksTcpConnectWithUserPass(t *testing.T) {
|
||||
|
||||
assert.Bytes([]byte(data2Send)).Equals(connOutput.Bytes())
|
||||
assert.Bytes(dataReturned).Equals(connInput)
|
||||
assert.String(targetServer).Equals(och.Destination.Address().String())
|
||||
assert.StringLiteral(targetServer).Equals(och.Destination.Address().String())
|
||||
}
|
||||
|
||||
func TestSocksTcpConnectWithWrongUserPass(t *testing.T) {
|
||||
@@ -277,5 +277,5 @@ func TestSocksUdpSend(t *testing.T) {
|
||||
assert.Error(err).IsNil()
|
||||
assert.Bytes(response[10:nBytes]).Equals(connInput)
|
||||
assert.Bytes(data2Send).Equals(connOutput.Bytes())
|
||||
assert.String(och.Destination.String()).Equals("udp:8.8.4.4:53")
|
||||
assert.StringLiteral(och.Destination.String()).Equals("udp:8.8.4.4:53")
|
||||
}
|
||||
Reference in new issue
Block a user