From 6e76e57b4ca9f42280cfe7fffda2abd1818e0c1d Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Mon, 28 Oct 2013 12:04:08 +0400 Subject: [PATCH] Trim strings before comparison --- compiler/tests/org/jetbrains/jet/JetTestUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/tests/org/jetbrains/jet/JetTestUtils.java b/compiler/tests/org/jetbrains/jet/JetTestUtils.java index bb7b3cc2dfd..9b0892a1b3f 100644 --- a/compiler/tests/org/jetbrains/jet/JetTestUtils.java +++ b/compiler/tests/org/jetbrains/jet/JetTestUtils.java @@ -385,8 +385,8 @@ public class JetTestUtils { String expected = FileUtil.loadFile(expectedFile, CharsetToolkit.UTF8, true); // compare with hard copy: make sure nothing is lost in output - String expectedText = StringUtil.convertLineSeparators(expected); - String actualText = StringUtil.convertLineSeparators(actual); + String expectedText = StringUtil.convertLineSeparators(expected.trim()); + String actualText = StringUtil.convertLineSeparators(actual.trim()); if (!Comparing.equal(expectedText, actualText)) { throw new FileComparisonFailure("Expected and actual namespaces differ from " + expectedFile.getName(), expected, actual, expectedFile.getAbsolutePath());