From 04c34c4b98ee209926eb6940f33e68a916b3d0fa Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Thu, 4 Feb 2010 15:47:44 +0000 Subject: [PATCH] bug 263987: [Error Parser] Uses up too much of the line Test case added --- .../errorparsers/tests/GCCErrorParserTests.java | 13 +++++++++++++ .../errorparsers/tests/GenericErrorParserTests.java | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GCCErrorParserTests.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GCCErrorParserTests.java index 569f28b6413..80607f4a2cf 100644 --- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GCCErrorParserTests.java +++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GCCErrorParserTests.java @@ -126,4 +126,17 @@ public class GCCErrorParserTests extends GenericErrorParserTests { runParserTest(GCC_ERROR_STREAM5, GCC_ERROR_STREAM5_ERRORS, GCC_ERROR_STREAM5_WARNINGS, GCC_ERROR_STREAM5_FILENAMES, null, new String[]{GCC_ERROR_PARSER_ID}); } + + public void testGccErrorMessages_Colon_bug263987() throws IOException { + runParserTest( + new String[] {"foo.cc:11:20: error: value with length 0 violates the length restriction: length (1 .. infinity)",}, + 1, // errors + 0, // warnings + new String[] {"foo.cc"}, + new String[] {"value with length 0 violates the length restriction: length (1 .. infinity)"}, + new String[] {GCC_ERROR_PARSER_ID} + ); + } + + } diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java index 15c64cc9651..cf27a20fb32 100644 --- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java +++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/GenericErrorParserTests.java @@ -146,7 +146,7 @@ public abstract class GenericErrorParserTests extends TestCase { if (expectedDescriptions != null) { assertNotNull(markerGenerator.lastDescription); for (int i = 0; i < expectedDescriptions.length; i++) { - assertTrue(markerGenerator.lastDescription.matches(expectedDescriptions[i])); + assertEquals(expectedDescriptions[i],markerGenerator.lastDescription); } } }