Move more unit test helpers to testfx, so they can be used by modules

This commit is contained in:
Jason Perkins 2014-07-07 17:03:14 -04:00
parent 5d5928a759
commit 1a84bd6530
2 changed files with 40 additions and 40 deletions

View File

@ -21,46 +21,6 @@
end
--
-- Some helper functions
--
test.createsolution = function()
local sln = solution "MySolution"
configurations { "Debug", "Release" }
local prj = project "MyProject"
language "C++"
kind "ConsoleApp"
return sln, prj
end
test.createproject = function(sln)
local n = #sln.projects + 1
if n == 1 then n = "" end
local prj = project ("MyProject" .. n)
language "C++"
kind "ConsoleApp"
return prj
end
test.getproject = function(sln, i)
local sln = premake.oven.bakeSolution(sln)
return premake.solution.getproject(sln, i or 1)
end
test.getconfig = function(prj, buildcfg, platform)
local sln = premake.oven.bakeSolution(prj.solution)
prj = premake.solution.getproject(sln, prj.name)
return premake.project.getconfig(prj, buildcfg, platform)
end
--
-- The test suites
--

View File

@ -215,6 +215,46 @@
end
--
-- Some helper functions
--
test.createsolution = function()
local sln = solution "MySolution"
configurations { "Debug", "Release" }
local prj = project "MyProject"
language "C++"
kind "ConsoleApp"
return sln, prj
end
test.createproject = function(sln)
local n = #sln.projects + 1
if n == 1 then n = "" end
local prj = project ("MyProject" .. n)
language "C++"
kind "ConsoleApp"
return prj
end
test.getproject = function(sln, i)
local sln = premake.oven.bakeSolution(sln)
return premake.solution.getproject(sln, i or 1)
end
test.getconfig = function(prj, buildcfg, platform)
local sln = premake.oven.bakeSolution(prj.solution)
prj = premake.solution.getproject(sln, prj.name)
return premake.project.getconfig(prj, buildcfg, platform)
end
--
-- Test stubs
--