diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-12-31 21:53:44 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-12-31 21:53:44 +0000 |
| commit | 1e770167feb081a1019fd4401ec583ab4f0543ff (patch) | |
| tree | 31de29c31001b32f56d7d397d3c0c550a5628301 /src/test/java/org/zwobble | |
| parent | 5cd453a6d3f6280f6c8324a4b333a0365eb1f605 (diff) | |
Add source root to class path when compiling
Diffstat (limited to 'src/test/java/org/zwobble')
| -rw-r--r-- | src/test/java/org/zwobble/couscous/tests/JavaToPythonTests.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/java/org/zwobble/couscous/tests/JavaToPythonTests.java b/src/test/java/org/zwobble/couscous/tests/JavaToPythonTests.java index 71a5cfe..edb0260 100644 --- a/src/test/java/org/zwobble/couscous/tests/JavaToPythonTests.java +++ b/src/test/java/org/zwobble/couscous/tests/JavaToPythonTests.java @@ -12,6 +12,7 @@ import java.io.File; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; +import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; @@ -134,7 +135,7 @@ public class JavaToPythonTests { "/java/" + directoryName + "/" + type.getQualifiedName().replace(".", "/") + ".java"); return execProgram( - directoryName(path, type.getQualifiedName().split(".").length), + directoryName(path, type.getQualifiedName().split("\\.").length), type, methodName, arguments); @@ -151,7 +152,7 @@ public class JavaToPythonTests { CouscousCompiler compiler = new CouscousCompiler( new JavaFrontend(), new PythonBackend(directoryPath, "couscous")); - compiler.compileDirectory(directory); + compiler.compileDirectory(directory, directory); return PythonMethodRunner.runFunction(directoryPath, type, methodName, arguments); } finally { deleteRecursively(directoryPath.toFile()); |
