public void testMdebug() throws PreprocessException {
public void testMdebug() throws BuildException {
	public void testMdebug() throws PreprocessException {		String[] sourceLines = new String[] {				"	//#mdebug",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		StringList lines = new StringList( sourceLines );		int result = this.preprocessor.preprocess( "com.company.package.MyClass", lines );		assertEquals( Preprocessor.CHANGED, result );		// test the same with a class for which debugging is disabled:		lines.reset();		result = this.preprocessor.preprocess( "com.company.package.MyOtherClass", lines );				// debug-level = info		sourceLines = new String[] {				"	//#mdebug",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.package.MyUndefinedClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug info",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.package.MyUndefinedClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug warn",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	System.out.println( hello );",				"	//#enddebug "		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.package.MyUndefinedClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug error",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.package.MyUndefinedClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug info",				"	//# System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.package.MyUndefinedClass", lines );		assertEquals( Preprocessor.CHANGED, result );				// debug-level = visual		sourceLines = new String[] {				"	//#mdebug",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.package.MyOtherClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug info",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.package.MyOtherClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug fatal",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.package.MyOtherClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug visual",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.package.MyOtherClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug notdefined",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.package.MyOtherClass", lines );		assertEquals( Preprocessor.CHANGED, result );		// debug-level = error		sourceLines = new String[] {				"	//#mdebug",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.util.MyOtherClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug info",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.util.MyOtherClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug warn",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.util.MyOtherClass", lines );		assertEquals( Preprocessor.CHANGED, result );				sourceLines = new String[] {				"	//#mdebug warn",				"	//#enddebug ",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.util.MyOtherClass", lines );		assertEquals( Preprocessor.NOT_CHANGED, result );				sourceLines = new String[] {				"	//#mdebug error",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.util.MyOtherClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug fatal",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.util.MyOtherClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug visual",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.util.MyOtherClass", lines );		assertEquals( Preprocessor.CHANGED, result );		sourceLines = new String[] {				"	//#mdebug undefined",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	//#enddebug ",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		result = this.preprocessor.preprocess( "com.company.util.MyOtherClass", lines );		assertEquals( Preprocessor.CHANGED, result );						// test invalid declarations:		sourceLines = new String[] {				"	//#mdebug",				"	System.out.println( \"test1 is defined\" );",				"	String hello =  \"hello world\";",				"	System.out.println( hello );"		};		lines = new StringList( sourceLines );		try {			this.preprocessor.preprocess( "com.company.util.MyOtherClass", lines );			fail( "#mdebug needs #enddebug, when #enddebug is not present, it should fail.");		} catch (PreprocessException e) {			/// expected behaviour!		}	}