aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Brodski2013-10-18 08:14:54 (EDT)
committerGerrit Code Review @ Eclipse.org2013-11-01 06:33:10 (EDT)
commitbda02a794b0803c2a7dacaf87d947a91fbfb9738 (patch)
treec5da75178d2a2b4364fad447b6bebd49f74b0c96
parenta03256fa816962171d2424f1755b91015bb516df (diff)
downloadorg.eclipse.xtext-bda02a794b0803c2a7dacaf87d947a91fbfb9738.zip
org.eclipse.xtext-bda02a794b0803c2a7dacaf87d947a91fbfb9738.tar.gz
org.eclipse.xtext-bda02a794b0803c2a7dacaf87d947a91fbfb9738.tar.bz2
[xtend][tests] Fix all AbstractRichStringEvaluationTest based tests onrefs/changes/40/17640/3
Windows Signed-off-by: Boris Brodski <brodsky_boris@yahoo.com>
-rw-r--r--tests/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/richstring/AbstractRichStringEvaluationTest.java10
-rw-r--r--tests/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/richstring/RichStringCompilerTest.java3
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/richstring/AbstractRichStringEvaluationTest.java b/tests/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/richstring/AbstractRichStringEvaluationTest.java
index c67a258..74e5720 100644
--- a/tests/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/richstring/AbstractRichStringEvaluationTest.java
+++ b/tests/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/richstring/AbstractRichStringEvaluationTest.java
@@ -8,6 +8,7 @@
package org.eclipse.xtend.core.tests.richstring;
import org.eclipse.xtend.core.tests.RuntimeInjectorProvider;
+import org.eclipse.xtend2.lib.StringConcatenation;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.junit.Assert;
@@ -21,6 +22,15 @@ import org.junit.runner.RunWith;
@InjectWith(RuntimeInjectorProvider.class)
public abstract class AbstractRichStringEvaluationTest extends Assert {
+ /**
+ * Default line separator to use.
+ *
+ * @return {@link StringConcatenation#DEFAULT_LINE_DELIMITER}
+ */
+ protected String nl() {
+ return StringConcatenation.DEFAULT_LINE_DELIMITER;
+ }
+
public abstract void assertOutput(String expectedOutput, String richString) throws Exception;
@Test public void testSimpleTemplate() throws Exception {
diff --git a/tests/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/richstring/RichStringCompilerTest.java b/tests/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/richstring/RichStringCompilerTest.java
index dce1360..65b0d2f 100644
--- a/tests/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/richstring/RichStringCompilerTest.java
+++ b/tests/org.eclipse.xtend.core.tests/src/org/eclipse/xtend/core/tests/richstring/RichStringCompilerTest.java
@@ -27,7 +27,8 @@ public class RichStringCompilerTest extends AbstractRichStringEvaluationTest {
@Override
public void assertOutput(String expectedOutput, String richString) throws Exception {
- testHelper.assertEvaluatesTo(expectedOutput, richString);
+ String platformExpectedOutput = expectedOutput.replace("\n", nl());
+ testHelper.assertEvaluatesTo(platformExpectedOutput, richString);
}
@Test public void testIf_09() throws Exception {