This repository has been archived on 2022-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
fuck-premake-old2/tests/solution/test_eachconfig.lua
Jason Perkins 17f1843c71 Finish renaming architectures away from x32/x64
A number of tests were relying on the fact that x32/x64 were being converted implicitly to x86/x86_64. If/when we retire those symbols, all of those tests would break. Renamed them now to avoid having to sort it out later. Also fixed up comments to keep everything consistent.
2015-04-13 18:27:11 -04:00

84 lines
1.5 KiB
Lua

--
-- tests/solution/test_eachconfig.lua
-- Automated test suite for the solution-level configuration iterator.
-- Copyright (c) 2012 Jason Perkins and the Premake project
--
T.solution_eachconfig = { }
local suite = T.solution_eachconfig
--
-- Setup and teardown
--
local sln
function suite.setup()
sln = solution("MySolution")
end
local function prepare()
_p(2,"-")
for cfg in premake.solution.eachconfig(sln) do
_p(2, "%s:%s", cfg.buildcfg or "", cfg.platform or "")
end
_p(2,"-")
end
--
-- All configurations listed at the solution level should be enumerated.
--
function suite.listsBuildConfigurations_onSolutionLevel()
configurations { "Debug", "Release" }
project("MyProject")
prepare()
test.capture [[
-
Debug:
Release:
-
]]
end
--
-- Iteration order should be build configurations, then platforms.
--
function suite.listsInOrder_onBuildConfigsAndPlatforms()
configurations { "Debug", "Release" }
platforms { "x86", "x86_64" }
project("MyProject")
prepare()
test.capture [[
-
Debug:x86
Debug:x86_64
Release:x86
Release:x86_64
-
]]
end
--
-- Configurations listed at the project level should *not* be included
-- in the solution-level lists.
--
function suite.excludesProjectLevelConfigs()
configurations { "Debug", "Release" }
project ("MyProject")
configurations { "PrjDebug", "PrjRelease" }
platforms { "x86", "x86_64" }
prepare()
test.capture [[
-
Debug:
Release:
-
]]
end