Skip to content

Commit

Permalink
[xtend][tests] Fix all AbstractRichStringEvaluationTest based tests on
Browse files Browse the repository at this point in the history
Windows

Signed-off-by: Boris Brodski <brodsky_boris@yahoo.com>
  • Loading branch information
borisbrodski authored and Gerrit Code Review @ Eclipse.org committed Nov 1, 2013
1 parent a03256f commit bda02a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Expand Up @@ -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;
Expand All @@ -21,6 +22,15 @@
@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 {
Expand Down
Expand Up @@ -27,7 +27,8 @@ public void setUp() throws Exception {

@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 {
Expand Down

0 comments on commit bda02a7

Please sign in to comment.