浏览代码

Remove redunent code

V2Ray 10 年之前
父节点
当前提交
1edd0e660e
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      proxy/socks/protocol/socks4_test.go

+ 1 - 5
proxy/socks/protocol/socks4_test.go

@@ -28,11 +28,7 @@ func TestSocks4AuthenticationRequestRead(t *testing.T) {
 func TestSocks4AuthenticationResponseToBytes(t *testing.T) {
 	assert := unit.Assert(t)
 
-	response := &Socks4AuthenticationResponse{
-		result: byte(0x10),
-		port:   443,
-		ip:     []byte{1, 2, 3, 4},
-	}
+	response := NewSocks4AuthenticationResponse(byte(0x10), 443, []byte{1, 2, 3, 4})
 
 	buffer := alloc.NewSmallBuffer().Clear()
 	defer buffer.Release()