1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-23 02:26:49 -05:00
v2fly/tools/build/env_test.go
Darien Raymond fa7c1069bc more update
2015-12-02 16:27:55 +00:00

28 lines
696 B
Go

package main
import (
"testing"
v2testing "github.com/v2ray/v2ray-core/testing"
"github.com/v2ray/v2ray-core/testing/assert"
)
func TestParseOS(t *testing.T) {
v2testing.Current(t)
assert.Pointer(parseOS("windows")).Equals(Windows)
assert.Pointer(parseOS("macos")).Equals(MacOS)
assert.Pointer(parseOS("linux")).Equals(Linux)
assert.Pointer(parseOS("test")).Equals(UnknownOS)
}
func TestParseArch(t *testing.T) {
v2testing.Current(t)
assert.Pointer(parseArch("x86")).Equals(X86)
assert.Pointer(parseArch("x64")).Equals(Amd64)
assert.Pointer(parseArch("arm")).Equals(Arm)
assert.Pointer(parseArch("arm64")).Equals(Arm64)
assert.Pointer(parseArch("test")).Equals(UnknownArch)
}