Skip to content
Snippets Groups Projects
Commit b9858f2e authored by Chris's avatar Chris
Browse files

Update Tests to match installation and method signature of assertEquals.

parent 5fc36f5b
No related branches found
No related tags found
No related merge requests found
...@@ -70,7 +70,7 @@ public class TestCpp { ...@@ -70,7 +70,7 @@ public class TestCpp {
Path mainPath = cppFilePaths.get(cppFilePaths.size() - 1); Path mainPath = cppFilePaths.get(cppFilePaths.size() - 1);
Process compileProcess = runtime Process compileProcess = runtime
.exec("g++ -std=c++14 -O2 -flto -march=native -g -DIMMER_NO_THREAD_SAFETY -o " + machineName + ".exec" + " out/test/resources/de/hhu/stups/codegenerator/" + machine + ".cpp"); .exec("g++ -std=c++14 -O2 -flto -march=native -g -DIMMER_NO_THREAD_SAFETY -o " + machineName + ".exec" + " build/resources/test/de/hhu/stups/codegenerator/" + machine + ".cpp");
compileProcess.waitFor(); compileProcess.waitFor();
String error = streamToString(compileProcess.getErrorStream()); String error = streamToString(compileProcess.getErrorStream());
...@@ -95,7 +95,7 @@ public class TestCpp { ...@@ -95,7 +95,7 @@ public class TestCpp {
System.out.println("Assert: " + result + " = " + expectedOutput); System.out.println("Assert: " + result + " = " + expectedOutput);
assertEquals(result, expectedOutput); assertEquals(expectedOutput, result);
cleanUp(mainPath.toString()); cleanUp(mainPath.toString());
} }
......
...@@ -89,7 +89,7 @@ public class TestJava { ...@@ -89,7 +89,7 @@ public class TestJava {
return; return;
} }
Process executeProcess = runtime.exec("java -cp btypes_persistent.jar:out/test/resources/de/hhu/stups/codegenerator/" + machinePath.substring(0, machinePath.length() - machineName.length()) + " " + machineName); Process executeProcess = runtime.exec("java -cp btypes_persistent.jar:build/resources/test/de/hhu/stups/codegenerator/" + machinePath.substring(0, machinePath.length() - machineName.length()) + " " + machineName);
executeProcess.waitFor(); executeProcess.waitFor();
error = streamToString(executeProcess.getErrorStream()); error = streamToString(executeProcess.getErrorStream());
...@@ -102,7 +102,7 @@ public class TestJava { ...@@ -102,7 +102,7 @@ public class TestJava {
System.out.println("Assert: " + result + " = " + expectedOutput); System.out.println("Assert: " + result + " = " + expectedOutput);
assertEquals(result, expectedOutput); assertEquals(expectedOutput, result);
Set<File> classFiles = javaFilePaths.stream() Set<File> classFiles = javaFilePaths.stream()
.map(path -> new File(path.getParent().toFile(), machinePath + ".class")) .map(path -> new File(path.getParent().toFile(), machinePath + ".class"))
......
...@@ -64,7 +64,7 @@ public class TestPython { ...@@ -64,7 +64,7 @@ public class TestPython {
} }
ProcessBuilder processBuilder = new ProcessBuilder(); ProcessBuilder processBuilder = new ProcessBuilder();
processBuilder.environment().put("PYTHONPATH", "btypes_persistent.jar"); processBuilder.environment().put("PYTHONPATH", "btypes_primitives/src/main/python");
processBuilder.command("python", "build/resources/test/de/hhu/stups/codegenerator/" + machinePath.substring(0, machinePath.length() - machineName.length()) + machineName + ".py"); processBuilder.command("python", "build/resources/test/de/hhu/stups/codegenerator/" + machinePath.substring(0, machinePath.length() - machineName.length()) + machineName + ".py");
Process executeProcess = processBuilder.start(); Process executeProcess = processBuilder.start();
executeProcess.waitFor(); executeProcess.waitFor();
...@@ -79,7 +79,7 @@ public class TestPython { ...@@ -79,7 +79,7 @@ public class TestPython {
System.out.println("Assert: " + result + " = " + expectedOutput); System.out.println("Assert: " + result + " = " + expectedOutput);
assertEquals(result, expectedOutput); assertEquals(expectedOutput, result);
/*Set<File> classFiles = pythonFilePaths.stream() /*Set<File> classFiles = pythonFilePaths.stream()
.map(path -> new File(path.getParent().toFile(), machinePath + ".class")) .map(path -> new File(path.getParent().toFile(), machinePath + ".class"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment