Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test_config_props.lua « vc2010 « vstudio « actions « tests - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 50d78aec92943cd3396d2f3bda89cea48d416126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
--
-- 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
--

	T.vstudio_vs2010_config_props = { }
	local suite = T.vstudio_vs2010_config_props
	local vc2010 = premake.vstudio.vc2010
	local project = premake.project


--
-- Setup
--

	local sln, prj

	function suite.setup()
		sln, prj = test.createsolution()
	end

	local function prepare(platform)
		premake.bake.buildconfigs()
		sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
		local cfginfo = sln.vstudio_configs[1]
		local cfg = premake.getconfig(prj, cfginfo.src_buildcfg, cfginfo.src_platform)
		vc2010.configurationPropertyGroup(cfg, cfginfo)
	end


--
-- Check the structure with the default project values.
--

	function suite.structureIsCorrect_onDefaultValues()
		prepare()
		test.capture [[
	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
		<ConfigurationType>Application</ConfigurationType>
		<UseDebugLibraries>true</UseDebugLibraries>
		<CharacterSet>MultiByte</CharacterSet>
	</PropertyGroup>
		]]
	end




--
-- Visual Studio 2012 adds a platform toolset.
--

	function suite.structureIsCorrect_onDefaultValues()
		_ACTION = "vs2012"
		prepare()
		test.capture [[
	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
		<ConfigurationType>Application</ConfigurationType>
		<UseDebugLibraries>true</UseDebugLibraries>
		<CharacterSet>MultiByte</CharacterSet>
		<PlatformToolset>v110</PlatformToolset>
	</PropertyGroup>
		]]
	end

	function suite.structureIsCorrect_onDefaultValues_on2013()
		_ACTION = "vs2013"
		prepare()
		test.capture [[
	<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
		<ConfigurationType>Application</ConfigurationType>
		<UseDebugLibraries>true</UseDebugLibraries>
		<CharacterSet>MultiByte</CharacterSet>
		<PlatformToolset>v120</PlatformToolset>
	</PropertyGroup>
		]]
	end