Commit fdc977df authored by Lückemeyer's avatar Lückemeyer
Browse files

fixed test and compile error package path index

parent 03286354
Showing with 2 additions and 2 deletions
+2 -2
......@@ -220,7 +220,7 @@ public class Testrunner
//
// result.name = (matcher.matches() && matcher.group(1) != null) ? matcher.group(1) : String.valueOf(e.getSource());
String sourcePath=String.valueOf(e.getSource());
result.packageName=sourcePath.substring(sourcePath.lastIndexOf(File.separator)-1);
result.packageName=sourcePath.substring(1, sourcePath.lastIndexOf(File.separator));
result.className=sourcePath.substring(sourcePath.lastIndexOf(File.separator)+1, sourcePath.length()-1);
result.name=result.className;
result.state = Result.State.COMPILATIONERROR.ordinal();
......@@ -257,7 +257,7 @@ public class Testrunner
{
String testParent=s.getParentId().get();
int lastDotIndex=testParent.lastIndexOf('.');
String testPackage=testParent.substring(testParent.lastIndexOf(':')+1, lastDotIndex-1);
String testPackage=testParent.substring(testParent.lastIndexOf(':')+1, lastDotIndex);
String testClass=testParent.substring(lastDotIndex+1, testParent.length()-1);
Result result = new Result();
result.packageName=testPackage;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment