massive refactoring against unit test lib

This commit is contained in:
Darien Raymond committed 2015-12-02 14:27:18 +00:00
1 parent cee85bdf26
commit 0a2e4343bc
44 files changed
+327 -317

No files matched your search

+2 -2
View File
@@ -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 -3
View File
@@ -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)
+2 -2
View File
@@ -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")