Change cpp unit test framework to catch2 for all cpp unit test projects

This commit is contained in:
Jan
2021-02-20 10:44:33 +01:00
parent 7ff87c2b73
commit b4f1e09315
7 changed files with 50 additions and 40 deletions

View File

@ -1,12 +1,16 @@
ZoneCommonTests = {}
function ZoneCommonTests:include()
if References:include(self:name()) then
includedirs {
path.join(TestFolder(), "ZoneCommonTests")
}
end
end
function ZoneCommonTests:link()
if References:link("ZoneCommonTests") then
links "ZoneCommonTests"
if References:link(self:name()) then
links(self:name())
end
end
@ -14,14 +18,18 @@ function ZoneCommonTests:use()
end
function ZoneCommonTests:name()
return "ZoneCommonTests"
end
function ZoneCommonTests:project()
References:reset()
local folder = TestFolder();
project "ZoneCommonTests"
project(self:name())
targetdir(TargetDirectoryTest)
location "%{wks.location}/test/%{prj.name}"
kind "SharedLib"
kind "ConsoleApp"
language "C++"
files {
@ -39,6 +47,7 @@ function ZoneCommonTests:project()
self:include()
ZoneCommon:include()
catch2:include()
ZoneCommon:link()