2012-09-27 16:18:03 +00:00
|
|
|
--
|
|
|
|
-- tests/tools/test_dotnet.lua
|
|
|
|
-- Automated test suite for the .NET toolset interface.
|
2013-11-14 13:52:55 +00:00
|
|
|
-- Copyright (c) 2012-2013 Jason Perkins and the Premake project
|
2012-09-27 16:18:03 +00:00
|
|
|
--
|
|
|
|
|
2013-11-14 13:52:55 +00:00
|
|
|
local suite = test.declare("tools_dotnet")
|
2012-11-27 15:28:17 +00:00
|
|
|
local dotnet = premake.tools.dotnet
|
2012-09-27 16:18:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Setup/teardown
|
|
|
|
--
|
|
|
|
|
|
|
|
local sln, prj, cfg
|
|
|
|
|
|
|
|
function suite.setup()
|
2013-11-14 13:52:55 +00:00
|
|
|
sln, prj = test.createsolution()
|
2012-09-27 16:18:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
local function prepare()
|
2013-11-14 13:52:55 +00:00
|
|
|
cfg = test.getconfig(prj, "Debug")
|
2012-09-27 16:18:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- On Windows, use Microsoft's CSC compiler by default.
|
|
|
|
--
|
|
|
|
|
|
|
|
function suite.defaultCompiler_onWindows()
|
|
|
|
_OS = "windows"
|
|
|
|
prepare()
|
|
|
|
test.isequal("csc", dotnet.gettoolname(cfg, "csc"))
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Everywhere other than Windows, use Mono by default.
|
|
|
|
--
|
|
|
|
|
|
|
|
function suite.defaultCompiler_onMacOSX()
|
|
|
|
_OS = "macosx"
|
|
|
|
prepare()
|
|
|
|
test.isequal("mcs", dotnet.gettoolname(cfg, "csc"))
|
|
|
|
end
|