diff options
author | Andy Clement <aclement@pivotal.io> | 2019-03-03 19:00:45 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2019-03-03 19:00:45 -0800 |
commit | f3623cc56e6b6bf03164e1b5cd03a31be5bacd47 (patch) | |
tree | ef04c1e492408392d809065481a49f0be6a6d86f /tests | |
parent | 59177efcaf7fe9e9570ec337393191bbecc495ec (diff) | |
download | aspectj-f3623cc56e6b6bf03164e1b5cd03a31be5bacd47.tar.gz aspectj-f3623cc56e6b6bf03164e1b5cd03a31be5bacd47.zip |
windows compatibility in tests
Diffstat (limited to 'tests')
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/incremental/tools/AnnotationProcessingTests.java b/tests/src/test/java/org/aspectj/systemtest/incremental/tools/AnnotationProcessingTests.java index 78d671946..80434fa5c 100644 --- a/tests/src/test/java/org/aspectj/systemtest/incremental/tools/AnnotationProcessingTests.java +++ b/tests/src/test/java/org/aspectj/systemtest/incremental/tools/AnnotationProcessingTests.java @@ -56,7 +56,7 @@ public class AnnotationProcessingTests extends AbstractMultiProjectIncrementalAj checkCompiledFiles("ProcessorConsumer1","Advise_ccc.java","Advise_aaa.java","Code.java"); assertEquals(2,getWeavingMessages("ProcessorConsumer1").size()); String out = runMethod("ProcessorConsumer1", "Code", "runner"); - assertEquals("aaa running\nccc running\n",out); + assertEquals("aaa running\nccc running\n",out.replace("\r","")); } // services file in processor project @@ -84,7 +84,7 @@ public class AnnotationProcessingTests extends AbstractMultiProjectIncrementalAj checkCompiledFiles("ProcessorConsumer2","Advise_ccc.java","Advise_aaa.java","Code.java"); assertEquals(2,getWeavingMessages("ProcessorConsumer2").size()); String out = runMethod("ProcessorConsumer2", "Code", "runner"); - assertEquals("aaa running\nccc running\n",out); + assertEquals("aaa running\nccc running\n",out.replace("\r","")); } // Two processors @@ -122,7 +122,7 @@ public class AnnotationProcessingTests extends AbstractMultiProjectIncrementalAj checkCompiledFiles("ProcessorConsumer1","Advise_ccc.java","Advise_aaa.java","Code.java","AroundAdvise_ccc.java","AroundAdvise_aaa.java"); assertEquals(4,getWeavingMessages("ProcessorConsumer1").size()); String out = runMethod("ProcessorConsumer1", "Code", "runner"); - assertEquals("aaa running\nAround advice on aaa running\nccc running\nAround advice on ccc running\n",out); + assertEquals("aaa running\nAround advice on aaa running\nccc running\nAround advice on ccc running\n",out.replace("\r","")); } // Tests: @@ -151,7 +151,7 @@ public class AnnotationProcessingTests extends AbstractMultiProjectIncrementalAj for (String expectedCompiledFile: expectedCompiledFiles) { String toRemove = null; for (String compiledFile: compiledFiles) { - String cfile = compiledFile.substring(compiledFile.lastIndexOf("/")+1); + String cfile = compiledFile.substring(compiledFile.lastIndexOf(File.separator)+1); if (cfile.equals(expectedCompiledFile)) { toRemove = compiledFile; break; diff --git a/tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index 779143bd1..0d01d9634 100644 --- a/tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -3579,11 +3579,11 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa initialiseProject("456801"); build("456801"); String output = runMethod("456801", "Code", "run"); - assertEquals("advice runnning\nrun() running\n",output); + assertEquals("advice runnning\nrun() running\n",output.replace("\r","")); alter("456801", "inc1"); build("456801"); output = runMethod("456801", "Code", "run"); - assertEquals("advice running\nrun() running\n",output); + assertEquals("advice running\nrun() running\n",output.replace("\r","")); checkCompileWeaveCount("456801", 1, 1); checkWasntFullBuild(); } |