rem: if( name == "(" ) 
add: if( name == "" ) 
context: function TestSuite( obj ){	this.mTests = new Array();	var name, str;	switch( typeof obj )	{		case "function":			if( !str )				str = new String( obj );			name = str.substring( str.indexOf( " " ) + 1, str.indexOf( "(" ));			if( name == "(" )				name = "[anonymous]";			break;		case "string": name = obj; break;		case "object": 			if( obj !== null )			{				if( obj.getName && typeof( obj.getName ) == "function" )				{					var tname = obj.getName();					if( tname )					{						var idx = tname.indexOf( "." );						if( idx == tname.lastIndexOf( "." ))							obj = eval( name = tname.substring( 0, idx ));					}				}				if( typeof( obj ) != "function" )					this.addTest( 						this.warning( "Cannot instantiate test class for " 							+ "object '" + obj + "'" ));			}			// fall through		case "undefined": 				// fall through		default: 			if( typeof( name ) == "undefined" )				name = null; 			break;	}	this.setName( name );	// collect all testXXX methods	if( typeof( obj ) == "function" && obj.prototype )	{		for( var member in obj.prototype )		{			if(    member.indexOf( "test" ) == 0 				&& typeof( obj.prototype[member] ) == "function" )			{				this.addTest( new ( obj )( member ));			}		}	}}
meta: 8928	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8928/35825daa47507a66444f5a4f2be38f81ddc883e8/JsUnit.js/buggy/branches/JsUnit_1-2_branch/jsunit/lib/JsUnit.js