forked from JavaTX/JavaCompilerCore
37 lines
1.1 KiB
Java
37 lines
1.1 KiB
Java
import de.dhbwstuttgart.core.JavaTXCompiler;
|
|
import org.junit.Test;
|
|
|
|
import java.io.File;
|
|
import java.util.List;
|
|
|
|
public class TestPackages {
|
|
|
|
private static final String bytecodeDirectory = System.getProperty("user.dir") + "/src/test/resources/testBytecode/generatedBC/";
|
|
|
|
@Test
|
|
public void testPackages() throws Exception {
|
|
var cmp = new JavaTXCompiler(
|
|
List.of(
|
|
new File("resources/packageTest/pkg/sub/Test1.jav") // This should pull in Test2
|
|
//new File("resources/packageTest/pkg/sub2/Test2.jav")
|
|
),
|
|
List.of(new File("resources/packageTest"))
|
|
);
|
|
|
|
cmp.generateBytecode(bytecodeDirectory);
|
|
}
|
|
|
|
@Test
|
|
public void testPackagesCircular() throws Exception {
|
|
var cmp = new JavaTXCompiler(
|
|
List.of(
|
|
new File("resources/packageTest/pkg/sub/Cycle1.jav")
|
|
//new File("resources/packageTest/pkg/sub2/Cycle2.jav")
|
|
),
|
|
List.of(new File("resources/packageTest"))
|
|
);
|
|
|
|
cmp.generateBytecode(bytecodeDirectory);
|
|
}
|
|
}
|