mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-30 22:15:27 -05:00
massive refactoring against unit test lib
This commit is contained in:
@@ -3,11 +3,12 @@ package net
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/v2ray/v2ray-core/testing/unit"
|
||||
v2testing "github.com/v2ray/v2ray-core/testing"
|
||||
"github.com/v2ray/v2ray-core/testing/assert"
|
||||
)
|
||||
|
||||
func TestTCPDestination(t *testing.T) {
|
||||
assert := unit.Assert(t)
|
||||
v2testing.Current(t)
|
||||
|
||||
dest := NewTCPDestination(IPAddress([]byte{1, 2, 3, 4}, 80))
|
||||
assert.Bool(dest.IsTCP()).IsTrue()
|
||||
@@ -16,7 +17,7 @@ func TestTCPDestination(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUDPDestination(t *testing.T) {
|
||||
assert := unit.Assert(t)
|
||||
v2testing.Current(t)
|
||||
|
||||
dest := NewUDPDestination(IPAddress([]byte{0x20, 0x01, 0x48, 0x60, 0x48, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88}, 53))
|
||||
assert.Bool(dest.IsTCP()).IsFalse()
|
||||
|
||||
Reference in New Issue
Block a user