module battery.testing.regular

Code Map

module battery.testing.regular;


class Regular : Test
{
public:
	//! Commands from the test file to execute.
	runs: string[][];
	//! Expected results of commands.
	retvals: i32[];
	//! Temporary file name for this test.
	tempName: string;
	//! Directory name.
	srcDir: string;
	//! Test file name.
	srcFile: string;
	//! Actual test file's name.
	testFileName: string;
	cmdGroup: CmdGroup;
	btj: BatteryTestsJson;


public:
	//! Construct a new Regular test. Params: srcDir: The directory that
	//! contains the test. test: The name of the test. testFileName: The
	//! filename of the primary test file. btj: The parsed battery.tests.json.
	//! project: The Project for this test. cs: A Configuration containing the
	//! tools and platform/arch information.
	this(srcDir: string, test: string, testFileName: string, btj: BatteryTestsJson, project: TestProject, cs: Configuration) { }
	fn parseCommand(line: string) bool { }
	fn runTest(cmdGroup: CmdGroup) { }
	fn getOutput() string { }
	fn getError() string { }
}

class RequireExpression
{
public:
	enum Type
	{
		None,
		And,
		Or,
	}


public:
	type: Type;
	isNot: bool;
	val: string;
	next: RequireExpression;
	err: string;
	test: Regular;


public:
	this(val: string, test: Regular) { }
	fn nextToken(s: string) RequireExpression { }
	//! Is this entire chain true or false?
	fn evaluate(arch: Arch, platform: Platform, requiresAliases: string[string]) bool { }
	//! Is the underlying condition true or false, ignore next and isNot.
	fn evaluateProject(arch: Arch, platform: Platform, requiresAliases: string[string]) bool { }
}