Source:
public void testAnnotationProcessorError004 ( ) throws java.lang.Exception { com.android.jack.test.helper.ErrorTestHelper te = new com.android.jack.test.helper.ErrorTestHelper ( ) ; buildAnnotationRequiredByAnnotationProc ( te , new java.lang.Class < ? > [ ] { com.android.jack.errorhandling.annotationprocessor.SourceAnnotationTest.class , com.android.jack.errorhandling.annotationprocessor.SourceErrorAnnotationTest.class } ) ; com.android.jack.test.toolchain.AbstractTestTools.createFile ( te.getSourceFolder ( ) , "jack.incremental" , "A.java" , ( ( ( ( ( ( ( "package jack.incremental;\n" + "import " ) + ( com.android.jack.errorhandling.annotationprocessor.SourceErrorAnnotationTest.class . getName ( ) ) ) + ";\n" ) + "@" ) + ( com.android.jack.errorhandling.annotationprocessor.SourceErrorAnnotationTest.class . getSimpleName ( ) ) ) + "\n" ) + "public class A {}\n" ) ) ; com.android.jack.test.toolchain.JackApiToolchain jackApiToolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackApiToolchain.class ) ; jackApiToolchain.setAnnotationProcessorClass ( com.android.jack.errorhandling.annotationprocessor.SourceAnnotationProcessor.class ) ; jackApiToolchain.setAnnotationProcessorOutDir ( te.getTestingFolder ( ) ) ; java.io.ByteArrayOutputStream errOut = new java.io.ByteArrayOutputStream ( ) ; jackApiToolchain.setErrorStream ( errOut ) ; try { jackApiToolchain.addToClasspath ( jackApiToolchain.getDefaultBootClasspath ( ) ) . addToClasspath ( te.getJackFolder ( ) ) . srcToExe ( te.getOutputDexFolder ( ) , false , te.getSourceFolder ( ) ) ; junit.framework.Assert.fail ( ) ; } catch ( com.android.jack.frontend.FrontendCompilationException ex ) { } finally { junit.framework.Assert.assertTrue ( errOut.toString ( ) . contains ( "Syntax error on tokens, delete these tokens" ) ) ; } }

Target:
public void testAnnotationProcessorError004 ( ) throws java.lang.Exception { com.android.jack.test.helper.ErrorTestHelper te = new com.android.jack.test.helper.ErrorTestHelper ( ) ; buildAnnotationRequiredByAnnotationProc ( te , new java.lang.Class < ? > [ ] { com.android.jack.errorhandling.annotationprocessor.SourceAnnotationTest.class , com.android.jack.errorhandling.annotationprocessor.SourceErrorAnnotationTest.class } ) ; com.android.jack.test.toolchain.AbstractTestTools.createFile ( te.getSourceFolder ( ) , "jack.incremental" , "A.java" , ( ( ( ( ( ( ( "package jack.incremental;\n" + "import " ) + ( com.android.jack.errorhandling.annotationprocessor.SourceErrorAnnotationTest.class . getName ( ) ) ) + ";\n" ) + "@" ) + ( com.android.jack.errorhandling.annotationprocessor.SourceErrorAnnotationTest.class . getSimpleName ( ) ) ) + "\n" ) + "public class A {}\n" ) ) ; com.android.jack.test.toolchain.JackApiToolchainBase jackApiToolchain = com.android.jack.test.toolchain.AbstractTestTools.getCandidateToolchain ( com.android.jack.test.toolchain.JackApiToolchainBase.class ) ; jackApiToolchain.setAnnotationProcessorClass ( com.android.jack.errorhandling.annotationprocessor.SourceAnnotationProcessor.class ) ; jackApiToolchain.setAnnotationProcessorOutDir ( te.getTestingFolder ( ) ) ; java.io.ByteArrayOutputStream errOut = new java.io.ByteArrayOutputStream ( ) ; jackApiToolchain.setErrorStream ( errOut ) ; try { jackApiToolchain.addToClasspath ( jackApiToolchain.getDefaultBootClasspath ( ) ) . addToClasspath ( te.getJackFolder ( ) ) . srcToExe ( te.getOutputDexFolder ( ) , false , te.getSourceFolder ( ) ) ; junit.framework.Assert.fail ( ) ; } catch ( com.android.jack.frontend.FrontendCompilationException ex ) { } finally { junit.framework.Assert.assertTrue ( errOut.toString ( ) . contains ( "Syntax error on tokens, delete these tokens" ) ) ; } }