Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/codan
diff options
context:
space:
mode:
authorHansruedi Patzen2017-11-24 09:44:11 +0000
committerHansruedi Patzen2017-11-24 09:44:11 +0000
commit19b4848e08c13928c1bda7235c10e77e54edf98e (patch)
tree0fefe5154ba6d4c0699602c0995ecec9a2eb730a /codan
parent93a5fcaa2a769c12f6ff805cf3cc53b8ecfab3bc (diff)
downloadorg.eclipse.cdt-19b4848e08c13928c1bda7235c10e77e54edf98e.tar.gz
org.eclipse.cdt-19b4848e08c13928c1bda7235c10e77e54edf98e.tar.xz
org.eclipse.cdt-19b4848e08c13928c1bda7235c10e77e54edf98e.zip
Bug 527709 - [Checker] Test suite fails on Windows
Change-Id: I70cf18245dc8dba14493f212c932ea08ae85a6cf Signed-off-by: Hansruedi Patzen <hansruedi.patzen@hsr.ch>
Diffstat (limited to 'codan')
-rw-r--r--codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/core/internal/checkers/AssignmentToItselfCheckerTest.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/core/tests/CodanTestCase.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/core/internal/checkers/AssignmentToItselfCheckerTest.java b/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/core/internal/checkers/AssignmentToItselfCheckerTest.java
index 869969c319..ef5f46bb18 100644
--- a/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/core/internal/checkers/AssignmentToItselfCheckerTest.java
+++ b/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/core/internal/checkers/AssignmentToItselfCheckerTest.java
@@ -76,6 +76,6 @@ public class AssignmentToItselfCheckerTest extends CheckerTestCase {
int start = marker.getAttribute(IMarker.CHAR_START, -1);
int end = marker.getAttribute(IMarker.CHAR_END, -1);
// The offset should start at the beginning of the expression "x = x"
- assertEquals("x\n = x", code.substring(start, end));
+ assertEquals("x" + NL + " = x", code.substring(start, end));
}
}
diff --git a/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/core/tests/CodanTestCase.java b/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/core/tests/CodanTestCase.java
index 718a998799..41321abc34 100644
--- a/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/core/tests/CodanTestCase.java
+++ b/codan/org.eclipse.cdt.codan.core.tests/src/org/eclipse/cdt/codan/core/tests/CodanTestCase.java
@@ -174,7 +174,7 @@ public class CodanTestCase extends BaseTestCase {
}
protected String getAboveComment() {
- return getContents(1)[0].toString();
+ return getContents(1)[0].toString().replaceAll("\\r\\n|\\n", NL);
}
protected StringBuilder[] getContents(int sections) {

Back to the top