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

vs200x_linker_tests.cpp « tests « vs200x « actions « src - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 10b8e0108fb340f38e29b1a81be13923fb4efba3 (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
79
80
/**
 * \file   vs200x_linker_tests.cpp
 * \brief  Automated tests for VS200x linker block processing.
 * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
 */

#include "premake.h"
#include "actions/tests/action_tests.h"
extern "C" {
#include "actions/vs200x/vs200x_project.h"
}

SUITE(action)
{
	/**********************************************************************
	 * Default settings
	 **********************************************************************/

	TEST_FIXTURE(FxAction, VCLinkerTool_Defaults_OnVs2002)
	{
		session_set_action(sess, "vs2002");
		vs200x_project_vc_linker_tool(sess, prj, strm);
		CHECK_EQUAL(
			"\t\t\t<Tool\n"
			"\t\t\t\tName=\"VCLinkerTool\"\n"
			"\t\t\t\tLinkIncremental=\"2\"\n"
			"\t\t\t\tGenerateDebugInformation=\"TRUE\"\n"
			"\t\t\t\tSubSystem=\"1\"\n"
			"\t\t\t\tEntryPointSymbol=\"mainCRTStartup\"\n"
			"\t\t\t\tTargetMachine=\"1\"/>\n",
			buffer);
	}

	TEST_FIXTURE(FxAction, VCLinkerTool_Defaults_OnVs2003)
	{
		session_set_action(sess, "vs2003");
		vs200x_project_vc_linker_tool(sess, prj, strm);
		CHECK_EQUAL(
			"\t\t\t<Tool\n"
			"\t\t\t\tName=\"VCLinkerTool\"\n"
			"\t\t\t\tLinkIncremental=\"2\"\n"
			"\t\t\t\tGenerateDebugInformation=\"TRUE\"\n"
			"\t\t\t\tSubSystem=\"1\"\n"
			"\t\t\t\tEntryPointSymbol=\"mainCRTStartup\"\n"
			"\t\t\t\tTargetMachine=\"1\"/>\n",
			buffer);
	}

	TEST_FIXTURE(FxAction, VCLinkerTool_Defaults_OnVs2005)
	{
		session_set_action(sess, "vs2005");
		vs200x_project_vc_linker_tool(sess, prj, strm);
		CHECK_EQUAL(
			"\t\t\t<Tool\n"
			"\t\t\t\tName=\"VCLinkerTool\"\n"
			"\t\t\t\tLinkIncremental=\"2\"\n"
			"\t\t\t\tGenerateDebugInformation=\"true\"\n"
			"\t\t\t\tSubSystem=\"1\"\n"
			"\t\t\t\tEntryPointSymbol=\"mainCRTStartup\"\n"
			"\t\t\t\tTargetMachine=\"1\"\n"
			"\t\t\t/>\n",
			buffer);
	}

	TEST_FIXTURE(FxAction, VCLinkerTool_Defaults_OnVs2008)
	{
		session_set_action(sess, "vs2008");
		vs200x_project_vc_linker_tool(sess, prj, strm);
		CHECK_EQUAL(
			"\t\t\t<Tool\n"
			"\t\t\t\tName=\"VCLinkerTool\"\n"
			"\t\t\t\tLinkIncremental=\"2\"\n"
			"\t\t\t\tGenerateDebugInformation=\"true\"\n"
			"\t\t\t\tSubSystem=\"1\"\n"
			"\t\t\t\tEntryPointSymbol=\"mainCRTStartup\"\n"
			"\t\t\t\tTargetMachine=\"1\"\n"
			"\t\t\t/>\n",
			buffer);
	}
}