mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-12 22:42:18 +00:00
massive refactoring against unit test lib
This commit is contained in:
1 parent
cee85bdf26
commit
0a2e4343bc
44 files changed
+327
-317
No files matched your search
@@ -6,7 +6,7 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"github.com/v2ray/v2ray-core/testing/unit"
|
||||
"github.com/v2ray/v2ray-core/testing/assert"
|
||||
)
|
||||
|
||||
func cleanBinPath() {
|
||||
@@ -31,7 +31,7 @@ func allFilesExists(files ...string) bool {
|
||||
}
|
||||
|
||||
func TestBuildMacOS(t *testing.T) {
|
||||
assert := unit.Assert(t)
|
||||
v2testing.Current(t)
|
||||
binPath = filepath.Join(os.Getenv("GOPATH"), "testing")
|
||||
cleanBinPath()
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ package main
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/v2ray/v2ray-core/testing/unit"
|
||||
"github.com/v2ray/v2ray-core/testing/assert"
|
||||
)
|
||||
|
||||
func TestParseOS(t *testing.T) {
|
||||
assert := unit.Assert(t)
|
||||
v2testing.Current(t)
|
||||
|
||||
assert.Pointer(parseOS("windows")).Equals(Windows)
|
||||
assert.Pointer(parseOS("macos")).Equals(MacOS)
|
||||
@@ -16,7 +16,7 @@ func TestParseOS(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestParseArch(t *testing.T) {
|
||||
assert := unit.Assert(t)
|
||||
v2testing.Current(t)
|
||||
|
||||
assert.Pointer(parseArch("x86")).Equals(X86)
|
||||
assert.Pointer(parseArch("x64")).Equals(Amd64)
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/v2ray/v2ray-core/testing/unit"
|
||||
"github.com/v2ray/v2ray-core/testing/assert"
|
||||
)
|
||||
|
||||
func TestBuildAndRun(t *testing.T) {
|
||||
assert := unit.Assert(t)
|
||||
v2testing.Current(t)
|
||||
|
||||
gopath := os.Getenv("GOPATH")
|
||||
target := filepath.Join(gopath, "src", "v2ray_test")
|
||||
|
||||
Reference in new issue
Block a user