local p = premake local suite = test.declare("test_android_project") local vc2010 = p.vstudio.vc2010 local android = p.modules.android -- -- Setup -- local wks, prj function suite.setup() p.action.set("vs2015") system "android" wks, prj = test.createWorkspace() end local function prepare() local cfg = test.getconfig(prj, "Debug") vc2010.clCompile(cfg) end local function prepareGlobals() prj = test.getproject(wks, 1) vc2010.globals(prj) end function suite.minVisualStudioVersion_14() prepareGlobals() test.capture [[ {42B5DBC6-AE1F-903D-F75D-41E363076E92} Android MyProject 14.0 Android 2.0]] end function suite.minVisualStudioVersion_15() p.action.set("vs2017") prepareGlobals() test.capture [[ {42B5DBC6-AE1F-903D-F75D-41E363076E92} $([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0')) Android MyProject 15.0 Android 3.0]] end function suite.minVisualStudioVersion_16() p.action.set("vs2019") prepareGlobals() test.capture [[ {42B5DBC6-AE1F-903D-F75D-41E363076E92} Android MyProject 16.0 Android 3.0]] end function suite.noOptions() prepare() test.capture [[ NotUsing Disabled ]] end function suite.rttiOff() rtti "Off" prepare() test.capture [[ NotUsing Disabled ]] end function suite.rttiOn() rtti "On" prepare() test.capture [[ NotUsing Disabled true ]] end function suite.exceptionHandlingOff() exceptionhandling "Off" prepare() test.capture [[ NotUsing Disabled ]] end function suite.exceptionHandlingOn() exceptionhandling "On" prepare() test.capture [[ NotUsing Disabled Enabled ]] end function suite.cppdialect_cpp11() cppdialect "C++11" prepare() test.capture [[ NotUsing Disabled c++11 ]] end function suite.cppdialect_cpp14() cppdialect "C++14" prepare() test.capture [[ NotUsing Disabled c++1y ]] end function suite.cppdialect_cpp17() cppdialect "C++17" prepare() test.capture [[ NotUsing Disabled c++1z ]] end