2024-02-02 12:06:37 +00:00
|
|
|
import de.dhbwstuttgart.core.JavaTXCompiler;
|
2024-03-16 16:16:23 +00:00
|
|
|
import org.junit.Ignore;
|
2024-02-02 12:06:37 +00:00
|
|
|
import org.junit.Test;
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
public class TestPackages {
|
|
|
|
|
2024-03-16 16:16:23 +00:00
|
|
|
private static final String bytecodeDirectory = System.getProperty("user.dir") + "targetTest";
|
2024-02-02 12:06:37 +00:00
|
|
|
|
|
|
|
@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);
|
|
|
|
}
|
|
|
|
}
|