Merge pull request #854 from Blizzard/high-warning

[core] Add High as a new warning level
This commit is contained in:
Tom van Dijck 2017-08-01 11:09:40 -07:00 committed by GitHub
commit 74819eb945
6 changed files with 23 additions and 2 deletions

View File

@ -1250,6 +1250,7 @@
allowed = {
"Off",
"Default",
"High",
"Extra",
}
}

View File

@ -78,6 +78,7 @@
},
warnings = {
Extra = "-Wall -Wextra",
High = "-Wall",
Off = "-w",
},
symbols = {

View File

@ -84,6 +84,7 @@
},
warnings = {
Extra = "/W4",
High = "/W4",
Off = "/W0",
},
stringpooling = {

View File

@ -177,14 +177,20 @@
local f = field.get("flags")
configset.store(cset, f, { "Symbols", "WinMain", "MFC" })
configset.remove(cset, f, { "WinMain" })
test.isequal({ "Symbols", "MFC" }, configset.fetch(cset, f, {}))
local result = configset.fetch(cset, f, {})
test.print(table.tostring(result))
test.isequal({ "Symbols", "MFC" }, result)
end
function suite.remove_onMultipleValues()
local f = field.get("flags")
configset.store(cset, f, { "Symbols", "Maps", "WinMain", "MFC" })
configset.remove(cset, f, { "Maps", "MFC" })
test.isequal({ "Symbols", "WinMain" }, configset.fetch(cset, f, {}))
local result = configset.fetch(cset, f, {})
test.print(table.tostring(result))
test.isequal({ "Symbols", "WinMain" }, result)
end

View File

@ -80,6 +80,12 @@
test.contains({ "-Wall -Wextra" }, gcc.getcflags(cfg))
end
function suite.cflags_onHighWarnings()
warnings "high"
prepare()
test.contains({ "-Wall" }, gcc.getcflags(cfg))
end
function suite.cflags_onFatalWarnings()
flags { "FatalWarnings" }
prepare()

View File

@ -181,6 +181,12 @@
test.contains("/W0", msc.getcflags(cfg))
end
function suite.cflags_OnHighWarnings()
warnings "High"
prepare()
test.contains("/W4", msc.getcflags(cfg))
end
function suite.cflags_OnExtraWarnings()
warnings "Extra"
prepare()