@Test public void testProcessorErrorOnElement() throws Exception { DiskFileSystem fs = diskFS("compiler.annotationexception"); Compiler compiler = Compiler.builder().javaCompiler(compilerProvider).sourcePath(fs).output(new RAMFileSystem()).build(); @javax.annotation.processing.SupportedSourceVersion(javax.lang.model.SourceVersion.RELEASE_6)
@Test public void testProcessorErrorOnElement() throws Exception { DiskFileSystem fs = diskFS("compiler.annotationexception"); Compiler compiler = Compiler.builder().javaCompiler(compilerProvider).sourcePath(fs).output(new RAMFileSystem()).build(); @javax.annotation.processing.SupportedSourceVersion(javax.lang.model.SourceVersion.RELEASE_6)
DiskFileSystem fs = diskFS("compiler.errorcode"); Compiler compiler = Compiler. builder().
DiskFileSystem fs = diskFS("compiler.annotationexception"); Compiler compiler = Compiler.builder().javaCompiler(compilerProvider).sourcePath(fs).output(new RAMFileSystem()).build(); @javax.annotation.processing.SupportedSourceVersion(javax.lang.model.SourceVersion.RELEASE_6)
DiskFileSystem fs = diskFS("compiler.errorcode"); Compiler compiler = Compiler. builder().
@Test public void testGetResourceFromSourcePath() throws Exception { DiskFileSystem input = diskFS("compiler.getresource"); RAMFileSystem output = new RAMFileSystem(); Compiler compiler = Compiler.builder().javaCompiler(compilerProvider).sourcePath(input).output(output).build(); GetResource processor = new GetResource(StandardLocation.SOURCE_PATH, FileKey.newResourceName("compiler.getresource", "A.txt")); compiler.addAnnotationProcessor(processor); compiler.compile(); assertEquals(1, output.size(ReadFileSystem.FILE)); processor.assertResource("value"); }
DiskFileSystem fs = diskFS("compiler.annotationexception"); Compiler compiler = Compiler.builder().javaCompiler(compilerProvider).sourcePath(fs).output(new RAMFileSystem()).build(); @javax.annotation.processing.SupportedSourceVersion(javax.lang.model.SourceVersion.RELEASE_6)
@Test public void testGetResourceFromSourcePath() throws Exception { DiskFileSystem input = diskFS("compiler.getresource"); RAMFileSystem output = new RAMFileSystem(); Compiler compiler = Compiler.builder().javaCompiler(compilerProvider).sourcePath(input).output(output).build(); GetResource processor = new GetResource(StandardLocation.SOURCE_PATH, FileKey.newResourceName("compiler.getresource", "A.txt")); compiler.addAnnotationProcessor(processor); compiler.compile(); assertEquals(1, output.size(ReadFileSystem.FILE)); processor.assertResource("value"); }