rem: "<" + this.mNest.replace(/-/g, "=") 
add: "<" + this.mNest.replace( /-/g, "=" ) 
context: function TextTestRunner(){	this._super = TestRunner;	this._super();		this.mRunTests = 0;	this.mNest = "";	this.mStartArgs = new Array();	/**	 * @@method	 * An occured error was added.	 * @param test The failed test.	 * @param except The thrown exception.	 */	function addError( test, except )	{		var str;		if( except instanceof Error )			str = except.message || except.description || "Unknown";		else			str = except;		this.writeLn( "ERROR in " + test + ": " + str );	}	/**	 * @@method	 * An occured failure was added.	 * @param test The failed test.	 * @param except The thrown exception.	 */	function addFailure( test, except )	{		this.writeLn( "FAILURE in " + test + ": " + except );		this.writeLn( except.mCallStack );	}	/**	 * @@method	 * A test ended	 * @param test The ended test.	 */	function endTest( test )	{		if( test.testCount != null )		{			this.mNest = this.mNest.substr( 1 );			this.writeLn( 				  "<" + this.mNest.replace(/-/g, "=") 				+ " Completed test suite \"" + test.name() + "\"" );		}	}	/**	 * @@method	 * Write a header starting the application.	 */	function printHeader( result )	{		this.writeLn( 			  "TestRunner(" + this.mStartArgs[0] + ") (" 			+ this.countTestCases() + " test cases available)" );	}	/**	 * @@method	 * Write a footer at application end with a summary of the tests.	 */	function printFooter( result )	{		if( result.wasSuccessful() == 0 )		{			var error = result.errorCount() != 1 ? " errors" : " error";			var failure = result.failureCount() != 1 ? " failures" : " failure";			this.writeLn( 				  result.errorCount() + error + ", " 				+ result.failureCount() + failure + "." );		}		else			this.writeLn( 				  result.runCount() + " tests successful in " 				+ ( this.mElapsedTime / 1000 ) + " seconds.");	}	/**	 * @@method Number	 * Start the test functionality of the application.	 * @param args list of test names in an array or a single test name	 * @returns 0 if no test fails, otherwise -1	 */	function start( args )	{		if( typeof( args ) == "undefined" )			args = new Array();		else if( typeof( args ) == "string" )			args = new Array( args );		if( args.length == 0 )			args[0] = "all";		this.mStartArgs = args;		var result = this.createTestResult();		result.addListener( this );		this.printHeader( result );		if( args[0] == "all" )			this.runAll( result );		else		{			for( var i = 0; i < args.length; ++ i )				this.run( args[i], result );		}		this.printFooter( result );		return result.wasSuccessful() ? 0 : -1;	}	/**	 * @@method	 * A test started	 * @param test The started test.	 */	function startTest( test )	{		if( test.testCount == null )		{			++this.mRunTests;			this.writeLn( 				  this.mNest + " Running test " 				+ this.mRunTests + ": \"" + test + "\"" );		}		else		{			this.writeLn( 				  this.mNest.replace(/-/g, "=") + "> Starting test suite \"" 				+ test.name() + "\"" );			this.mNest += "-";		}	}	/**	 * @@method	 * Write a line of text.	 * @param str The text to print on the line.	 * The method of this object does effectivly nothing. It must be 	 * overloaded with a proper version, that knows how to print a line.	 */	function writeLn( str ) {}	this.addFailure = addFailure;	this.addError = addError;	this.endTest = endTest;	this.printHeader = printHeader;	this.printFooter = printFooter;	this.start = start;	this.startTest = startTest;	this.writeLn = writeLn;}
meta: 8928	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8928/768c9d05d44318954f6a9ac3ebfad030ccd6c207/JsUnit.js/clean/trunk/jsunit/lib/JsUnit.js