Split UTs according to review.

This commit is contained in:
Jarod42 2020-08-30 11:25:06 +02:00
parent 157f40cdac
commit f91def371d

View File

@ -57,18 +57,28 @@
end end
function suite.OnProjectCfg_Includes() function suite.OnProjectCfg_Includes()
sysincludedirs { "sysdir", "sysdir2/"}
includedirs { "dir/", "dir2" } includedirs { "dir/", "dir2" }
prepare() prepare()
codelite.project.compiler(cfg) codelite.project.compiler(cfg)
test.capture [[ test.capture [[
<Compiler Options="-isystem sysdir;-isystem sysdir2" C_Options="-isystem sysdir;-isystem sysdir2" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags=""> <Compiler Options="" C_Options="" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags="">
<IncludePath Value="dir"/> <IncludePath Value="dir"/>
<IncludePath Value="dir2"/> <IncludePath Value="dir2"/>
</Compiler> </Compiler>
]] ]]
end end
function suite.OnProjectCfg_SysIncludes()
sysincludedirs { "sysdir", "sysdir2/"}
prepare()
codelite.project.compiler(cfg)
test.capture [[
<Compiler Options="-isystem sysdir;-isystem sysdir2" C_Options="-isystem sysdir;-isystem sysdir2" Assembler="" Required="yes" PreCompiledHeader="" PCHInCommandLine="no" UseDifferentPCHFlags="no" PCHFlags="">
</Compiler>
]]
end
function suite.OnProjectCfg_Defines() function suite.OnProjectCfg_Defines()
defines { "TEST", "DEF", "VAL=1", "ESCAPE=\"WITH SPACE\"" } defines { "TEST", "DEF", "VAL=1", "ESCAPE=\"WITH SPACE\"" }
prepare() prepare()
@ -127,16 +137,36 @@
function suite.OnProjectCfg_ResInclude() function suite.OnProjectCfg_ResInclude()
files { "x.rc" } files { "x.rc" }
includedirs { "dir/" } resincludedirs { "dir/" }
prepare()
codelite.project.resourceCompiler(cfg)
test.capture [[
<ResourceCompiler Options="" Required="yes">
<IncludePath Value="dir"/>
</ResourceCompiler>
]]
end
function suite.OnProjectCfg_ResRegularInclude()
files { "x.rc" }
includedirs { "regulardir/" }
prepare()
codelite.project.resourceCompiler(cfg)
test.capture [[
<ResourceCompiler Options="" Required="yes">
<IncludePath Value="regulardir"/>
</ResourceCompiler>
]]
end
function suite.OnProjectCfg_ResSysInclude()
files { "x.rc" }
sysincludedirs { "sysdir/" } sysincludedirs { "sysdir/" }
resincludedirs { "resdir/" }
prepare() prepare()
codelite.project.resourceCompiler(cfg) codelite.project.resourceCompiler(cfg)
test.capture [[ test.capture [[
<ResourceCompiler Options="" Required="yes"> <ResourceCompiler Options="" Required="yes">
<IncludePath Value="sysdir"/> <IncludePath Value="sysdir"/>
<IncludePath Value="dir"/>
<IncludePath Value="resdir"/>
</ResourceCompiler> </ResourceCompiler>
]] ]]
end end