예제 #1
0
 public Compiler assertCompile() {
   try {
     strategy.compile();
     classLoader = new URLClassLoader(new URL[] {strategy.classOutput.getURL()}, baseClassLoader);
     return strategy.compiler;
   } catch (Exception e) {
     throw AbstractTestCase.failure(e);
   }
 }
예제 #2
0
 public List<CompilationError> failCompile() {
   try {
     strategy.compile();
     throw AbstractTestCase.failure("Was expecting compilation to fail");
   } catch (CompilationException e) {
     return e.getErrors();
   } catch (Exception e) {
     throw AbstractTestCase.failure(e);
   }
 }
예제 #3
0
 public CompilerAssert<I, O> addClassPath(ReadFileSystem<?> classPath) {
   strategy.addClassPath(classPath);
   return this;
 }
예제 #4
0
 public CompilerAssert<I, O> with(Provider<? extends Processor> processorFactory) {
   strategy.processorFactory = processorFactory;
   return this;
 }