-- -- tests/actions/vstudio/vc2010/test_config_props.lua -- Validate generation of the configuration property group. -- Copyright (c) 2011-2013 Jason Perkins and the Premake project -- local p = premake local suite = test.declare("vstudio_vs2010_config_props") local vc2010 = p.vstudio.vc2010 local project = p.project -- -- Setup -- local wks, prj function suite.setup() p.action.set("vs2010") wks, prj = test.createWorkspace() end local function prepare() cfg = test.getconfig(prj, "Debug") vc2010.configurationProperties(cfg) end -- -- Check the structure with the default project values. -- function suite.structureIsCorrect_onDefaultValues() prepare() test.capture [[ Application false Unicode v100 ]] end -- -- Check the configuration type for differenet project kinds. -- function suite.configurationType_onConsoleApp() kind "ConsoleApp" prepare() test.capture [[ Application ]] end function suite.configurationType_onWindowedApp() kind "WindowedApp" prepare() test.capture [[ Application ]] end function suite.configurationType_onSharedLib() kind "SharedLib" prepare() test.capture [[ DynamicLibrary ]] end function suite.configurationType_onStaticLib() kind "StaticLib" prepare() test.capture [[ StaticLibrary ]] end -- -- Debug configurations (for some definition of "debug") should use the debug libraries. -- function suite.debugLibraries_onDebugConfig() symbols "On" prepare() test.capture [[ Application true ]] end -- -- Check the support for Managed C++. -- function suite.clrSupport_onClrOn() clr "On" prepare() test.capture [[ Application false true ]] end function suite.clrSupport_onClrOff() clr "Off" prepare() test.capture [[ Application false ]] end function suite.clrSupport_onClrUnsafe() clr "Unsafe" prepare() test.capture [[ Application false true ]] end function suite.clrSupport_onClrSafe() clr "Safe" prepare() test.capture [[ Application false Safe ]] end function suite.clrSupport_onClrPure() clr "Pure" prepare() test.capture [[ Application false Pure ]] end -- -- Check the support for building with MFC. -- function suite.useOfMfc_onDynamicRuntime() flags "MFC" prepare() test.capture [[ Application false Dynamic ]] end function suite.useOfMfc_onStaticRuntime() flags { "MFC" } staticruntime "On" prepare() test.capture [[ Application false Static ]] end -- -- Check the support for building with ATL. -- function suite.useOfAtl_onDynamicRuntime() atl "Dynamic" prepare() test.capture [[ Application false Dynamic ]] end function suite.useOfAtl_onStaticRuntime() atl "Static" prepare() test.capture [[ Application false Static ]] end -- -- Check handling of the ReleaseRuntime flag; should override the -- default behavior of linking the debug runtime when symbols are -- enabled with no optimizations. -- function suite.releaseRuntime_onFlag() runtime "Release" symbols "On" prepare() test.capture [[ Application false ]] end -- -- Check the default settings for a Makefile configuration: new -- configuration type, no character set, output and intermediate -- folders are moved up from their normal location in the output -- configuration element. -- function suite.structureIsCorrect_onMakefile() kind "Makefile" prepare() test.capture [[ Makefile false bin\Debug\ obj\Debug\ ]] end function suite.structureIsCorrect_onNone() kind "None" prepare() test.capture [[ Makefile false bin\Debug\ obj\Debug\ ]] end -- -- Same as above but for Utility -- function suite.structureIsCorrect_onUtility() kind "Utility" prepare() test.capture [[ Utility v100 ]] end -- -- Check the LinkTimeOptimization flag -- function suite.useOfLinkTimeOptimization() flags { "LinkTimeOptimization" } prepare() test.capture [[ Application false Unicode v100 true ]] end -- -- Check the WindowsSDKDesktopARMSupport element -- function suite.WindowsSDKDesktopARMSupport_off() system "ios" architecture "ARM" prepare() test.capture [[ Application false Unicode v100 ]] end function suite.WindowsSDKDesktopARMSupport_on() system "windows" architecture "ARM" prepare() test.capture [[ Application false Unicode v100 true ]] end function suite.WindowsSDKDesktopARM64Support() system "windows" architecture "ARM64" prepare() test.capture [[ Application false Unicode v100 true ]] end