Add test for omitframepointer Default in vstudio + fix omitframepointer Default in vstudio

This commit is contained in:
thomas desveaux 2018-04-12 20:14:57 +02:00
parent 00aa3a8582
commit 3ebbe97c2c
2 changed files with 17 additions and 3 deletions

View File

@ -1260,6 +1260,18 @@
-- Check OmitFramePointer
--
function suite.omitFramePointer_Default()
omitframepointer "Default"
prepare()
test.capture [[
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
</ClCompile>
]]
end
function suite.omitFramePointer_On()
omitframepointer "On"
prepare()

View File

@ -2153,9 +2153,11 @@
function m.omitFramePointers(cfg)
if cfg.omitframepointer then
local map = { Off = "false", On = "true" }
m.element("OmitFramePointers", nil, map[cfg.omitframepointer])
local map = { Off = "false", On = "true" }
local value = map[cfg.omitframepointer]
if value then
m.element("OmitFramePointers", nil, value)
end
end