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

script_tests.h « tests « script « src - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5791ccc6d41324d9aff45af78a7e0c74a6b8f256 (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
/**
 * \file   script_tests.h
 * \brief  Common fixtures for script function tests.
 * \author Copyright (c) 2008 Jason Perkins and the Premake project
 */

#include "testing/testing.h"
extern "C" {
#include "script/script.h"
#include "base/error.h"
}


struct FxScript
{
	Script script;

	FxScript()
	{
		script = script_create();
	}

	~FxScript()
	{
		script_destroy(script);
		error_clear();
	}
};


struct FxAccessor : FxScript
{
	FxAccessor()
	{
		script_run_string(script,
			"sln = solution 'MySolution';"
			"        configurations {'Debug','Release'};"
			"prj = project 'MyProject';");
	}
};