mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
added test for SimpleCompiler
This commit is contained in:
parent
9646d321a4
commit
72ebde8fb3
30
src/test/java/com/mysema/codegen/SimpleCompilerTest.java
Normal file
30
src/test/java/com/mysema/codegen/SimpleCompilerTest.java
Normal file
@ -0,0 +1,30 @@
|
||||
package com.mysema.codegen;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.tools.JavaCompiler;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class SimpleCompilerTest {
|
||||
|
||||
@Test
|
||||
public void testRun() {
|
||||
new File("target/out").mkdir();
|
||||
JavaCompiler compiler = new SimpleCompiler();
|
||||
System.out.println(compiler.getClass().getName());
|
||||
List<String> options = new ArrayList<String>(3);
|
||||
options.add("-s");
|
||||
options.add("target/out");
|
||||
options.add("src/test/java/com/mysema/codegen/SimpleCompilerTest.java");
|
||||
int compilationResult = compiler.run(null, null, null, options.toArray(new String[options.size()]));
|
||||
if(compilationResult != 0){
|
||||
Assert.fail("Compilation Failed");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user