From 1a84bd6530edb4bb040634ac7f14c2fd75058d86 Mon Sep 17 00:00:00 2001 From: Jason Perkins Date: Mon, 7 Jul 2014 17:03:14 -0400 Subject: [PATCH] Move more unit test helpers to testfx, so they can be used by modules --- tests/premake5.lua | 40 ---------------------------------------- tests/testfx.lua | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/tests/premake5.lua b/tests/premake5.lua index f5b7c628..4f564836 100644 --- a/tests/premake5.lua +++ b/tests/premake5.lua @@ -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 -- diff --git a/tests/testfx.lua b/tests/testfx.lua index 6246e34b..7c05a558 100644 --- a/tests/testfx.lua +++ b/tests/testfx.lua @@ -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 --