diff options
| author | ruki <[email protected]> | 2020-06-23 22:37:44 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-06-23 22:37:44 +0800 |
| commit | c18d15eb89116a0f3ce96bd56f3ccf861849f6ec (patch) | |
| tree | 52b63db3274349f9a41872414208c7c30058cfd7 /tests | |
| parent | 53df324acd9c7432336a5894ceef578daa1ce38d (diff) | |
| parent | 18bded45c229f5580c13fc8b4afc5edb6f18819a (diff) | |
Merge pull request #857 from xmake-io/toolchain
Improve toolchain to support host and cross toolchains at same time
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modules/math/test.lua | 4 | ||||
| -rw-r--r-- | tests/plugins/project/test.lua | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/modules/math/test.lua b/tests/modules/math/test.lua index 3d05adb61..bcbd11fd3 100644 --- a/tests/modules/math/test.lua +++ b/tests/modules/math/test.lua @@ -4,8 +4,8 @@ function test_isinf(t) t:require_not(math.isinf(0)) t:require_not(math.isinf(math.nan)) - t:are_same(math.isinf(math.huge), 1) - t:are_same(math.isinf(-math.huge), -1) + t:are_same(math.isinf(math.inf), 1) + t:are_same(math.isinf(-math.inf), -1) end function test_isnan(t) diff --git a/tests/plugins/project/test.lua b/tests/plugins/project/test.lua index e3295d68d..5cc1e7e0e 100644 --- a/tests/plugins/project/test.lua +++ b/tests/plugins/project/test.lua @@ -1,7 +1,7 @@ -import("detect.sdks.find_vstudio") import("core.project.config") import("core.platform.platform") -import("core.platform.environment") +import("core.tool.toolchain") +import("lib.detect.find_tool") function test_vsxmake(t) @@ -34,9 +34,9 @@ function test_vsxmake(t) try { function () - environment.enter("toolchains") - os.exec("msbuild /P:XmakeDiagnosis=true /P:XmakeVerbose=true") - environment.leave("toolchains") + local runenvs = toolchain.load("msvc"):runenvs() + local msbuild = find_tool("msbuild", {envs = runenvs}) + os.execv(msbuild.program, {"/P:XmakeDiagnosis=true", "/P:XmakeVerbose=true"}, {envs = runenvs}) end, catch { |
