Move more unit test helpers to testfx, so they can be used by modules
This commit is contained in:
parent
5d5928a759
commit
1a84bd6530
@ -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
|
||||
--
|
||||
|
@ -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
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user