Source:
public void testAnnotationProcessorError005 ( ) 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.SourceAnnotationTest.class . getName ( ) ) ) + ";\n" ) + "@" ) + ( com.android.jack.errorhandling.annotationprocessor.SourceAnnotationTest.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.File dexOutput = te.getOutputDexFolder ( ) ; jackApiToolchain.srcToExe ( ( ( ( com.android.jack.test.toolchain.AbstractTestTools.getClasspathAsString ( jackApiToolchain.getDefaultBootClasspath ( ) ) ) + ( java.io.File.pathSeparator ) ) + ( te.getJackFolder ( ) ) ) , dexOutput , false , te.getSourceFolder ( ) ) ; org.jf.dexlib.DexFile dexFile = new org.jf.dexlib.DexFile ( new java.io.File ( dexOutput , jackApiToolchain.getBinaryFileName ( ) ) ) ; java.util.List < java.lang.String > sourceFileInDex = new java.util.ArrayList < java.lang.String > ( ) ; for ( org.jf.dexlib.ClassDefItem classDef : dexFile.ClassDefsSection.getItems ( ) ) { sourceFileInDex.add ( classDef.getSourceFile ( ) . getStringValue ( ) ) ; } junit.framework.Assert.assertTrue ( sourceFileInDex.contains ( "ADuplicated.java" ) ) ; junit.framework.Assert.assertTrue ( sourceFileInDex.contains ( "A.java" ) ) ; }

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.setAnnotationProcessorClasses ( java.util.Collections.singletonList ( com.android.jack.errorhandling.annotationprocessor.SourceAnnotationProcessor.class . getName ( ) ) ) ; 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" ) ) ; } }