Skip to content

Commit

Permalink
@monperrus at work
Browse files Browse the repository at this point in the history
  • Loading branch information
monperrus committed Nov 6, 2020
1 parent 56d55cf commit c03813d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ public void testSelector() throws Exception {
if (!directory.exists()) {
directory.mkdir();
}
assertEquals(getContentReportFile(), this.testSelectorUnderTest.report().output(this.getTestClass(), outputDirectory ));
assertEquals(stripLineNumbers(getContentReportFile()), stripLineNumbers(this.testSelectorUnderTest.report().output(this.getTestClass(), outputDirectory )));
}

private String stripLineNumbers(String output) {
String result = output.replaceAll("[0-9]+", "");
return result;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ protected CtMethod<?> getAmplifiedTest() {
protected String getContentReportFile() {
return "1 amplified test fails on the new versions." + AmplificationHelper.LINE_SEPARATOR +
"test2(example.TestSuiteExample): String index out of range: -1java.lang.StringIndexOutOfBoundsException: String index out of range: -1" + AmplificationHelper.LINE_SEPARATOR +
"\tat java.lang.String.charAt(String.java:658)" + AmplificationHelper.LINE_SEPARATOR +
"\tat java.lang.String.charAt(String.java:646)" + AmplificationHelper.LINE_SEPARATOR +
"\tat example.Example.charAt(Example.java:16)" + AmplificationHelper.LINE_SEPARATOR +
"\tat example.TestSuiteExample.test2(TestSuiteExample.java:8)" + AmplificationHelper.LINE_SEPARATOR +
"\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)" + AmplificationHelper.LINE_SEPARATOR +
"\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)" + AmplificationHelper.LINE_SEPARATOR +
"\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)" + AmplificationHelper.LINE_SEPARATOR +
"\tat java.lang.reflect.Method.invoke(Method.java:498)" + AmplificationHelper.LINE_SEPARATOR +
"\tat java.lang.reflect.Method.invoke(Method.java:497)" + AmplificationHelper.LINE_SEPARATOR +
"\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)" + AmplificationHelper.LINE_SEPARATOR +
"\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)" + AmplificationHelper.LINE_SEPARATOR +
"\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)" + AmplificationHelper.LINE_SEPARATOR +
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<!-- version of common dependencies -->
<spoon.version>8.1.0-SNAPSHOT</spoon.version>
<junit4.version>4.12</junit4.version>
<slf4j.version>1.7.25</slf4j.version>
<slf4j.version>1.8.0-beta4</slf4j.version>
<maven.invoker.version>3.0.0</maven.invoker.version>
<gumtree.spoon.ast.diff.version>1.5</gumtree.spoon.ast.diff.version>
<maven.plugin.version>3.5.4</maven.plugin.version>
Expand Down

0 comments on commit c03813d

Please sign in to comment.