Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Tyrion.TyrionUnitTest


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
//=====================================================================
// A generic test harness for Tyrion unit tests
//=====================================================================

class TyrionUnitTest extends Engine.Actor
	placeable;

//=====================================================================
// Constants

const PASS_THRESHOLD_PROXIMITY = 100;

//=====================================================================
// Variables

var() string nextLevelURL;			// next test to perform

var Engine.Pawn workPawn;
var AI_Controller workController;

//=====================================================================
// Functions

function PostBeginPlay()
{
	Super.PostBeginPlay();

	SetTimer(3.0, false);			// call Timer() in 3 seconds
}

//---------------------------------------------------------------------

event Timer()
{
	GotoState('UnitTestState');
}

//---------------------------------------------------------------------

function logTest(string text)
{
	Log("Unit Test: " $ text);
}

//---------------------------------------------------------------------

function signalPassed()
{
	Log("Test Passed");
	gotoNextLevel();
}

//---------------------------------------------------------------------

function signalFailed(string reason)
{
	Log("Test Failed: " $ reason);
	gotoNextLevel();
}

//---------------------------------------------------------------------

function gotoNextLevel()
{
	if (nextLevelURL == "")
		Log("Unit Test Chain Finished");
	else
		Level.ServerTravel(nextLevelURL, false);
}

//---------------------------------------------------------------------

function Engine.Pawn getPawn(string pawnName)
{
	return Engine.Pawn(findObject(pawnName, class'Pawn', Level.Outer));
}

//=====================================================================

defaultProperties
{
	Texture=Texture'Engine_res.S_Trigger'
	bNoDelete=true
	bHidden=true
	bCollideWhenPlacing=true
//#if !IG_DISABLE_UNREAL_ACTOR_SOUND_MANAGEMENT // ckline: use IG_EFFECTS system instead of old Unreal per-actor sound specifications
//	SoundVolume=0
//#endif
    CollisionRadius=+00080.000000
	CollisionHeight=+00100.000000
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: ne 5.9.2004 15:54:30.000 - Creation time: st 23.5.2018 00:10:49.641 - Created with UnCodeX