1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 08:55:25 +02:00

bug 308322: [Error Parser] XlcErrorParser shouldn't keep leading spaces in error description

This commit is contained in:
Andrew Gvozdev 2010-04-07 13:51:38 +00:00
parent 00a7b4dfa4
commit 766aa21c74
13 changed files with 26 additions and 26 deletions

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -29,7 +29,7 @@ public class TestCompatibility extends TestCase {
assertEquals("temp1.c", aix.getFileName());
assertEquals(5, aix.getLineNumber());
assertEquals(IMarkerGenerator.SEVERITY_INFO, aix.getSeverity());
assertEquals(" Compatibility test",aix.getMessage());
assertEquals("Compatibility test",aix.getMessage());
}
public TestCompatibility( String name)
{

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -30,7 +30,7 @@ public class TestConditional extends TestCase {
assertEquals("temp8.c", aix.getFileName());
assertEquals(12, aix.getLineNumber());
assertEquals(IMarkerGenerator.SEVERITY_INFO, aix.getSeverity());
assertEquals(" The then branch of conditional is an empty statement.",aix.getMessage());
assertEquals("The then branch of conditional is an empty statement.",aix.getMessage());
}
public TestConditional( String name)
{

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -31,7 +31,7 @@ public class TestFloatingPoint extends TestCase {
assertEquals("temp9.c", aix.getFileName());
assertEquals(11, aix.getLineNumber());
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity());
assertEquals(" Floating point constant 10.23.3 is not valid",
assertEquals("Floating point constant 10.23.3 is not valid",
aix.getMessage());
}
public TestFloatingPoint( String name)

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -30,7 +30,7 @@ public class TestFuncArg extends TestCase {
assertEquals("temp9.c", aix.getFileName());
assertEquals(12, aix.getLineNumber());
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity());
assertEquals(" Function argument assignment between types " +
assertEquals("Function argument assignment between types " +
"\"int\" and \"char*\" is not allowed.",
aix.getMessage());
}

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -29,7 +29,7 @@ public class TestMacroRedefinition extends TestCase {
assertEquals("temp1.h", aix.getFileName());
assertEquals(3, aix.getLineNumber());
assertEquals(IMarkerGenerator.SEVERITY_WARNING, aix.getSeverity());
assertEquals(" Macro name TEMP_1 originally defined in file temp1.h",aix.getMessage());
assertEquals("Macro name TEMP_1 originally defined in file temp1.h",aix.getMessage());
}
public TestMacroRedefinition( String name)
{

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -31,7 +31,7 @@ public class TestMissingArg extends TestCase {
assertEquals("temp8.c", aix.getFileName());
assertEquals(9, aix.getLineNumber());
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity());
assertEquals(" Missing argument(s).",aix.getMessage());
assertEquals("Missing argument(s).",aix.getMessage());
}
public TestMissingArg( String name)
{

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -28,7 +28,7 @@ public class TestNoFuncProto extends TestCase {
assertEquals("temp1.c", aix.getFileName());
assertEquals(5, aix.getLineNumber());
assertEquals(IMarkerGenerator.SEVERITY_WARNING, aix.getSeverity());
assertEquals(" No function prototype given for \"printf\".",aix.getMessage());
assertEquals("No function prototype given for \"printf\".",aix.getMessage());
}
public TestNoFuncProto( String name)
{

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -30,7 +30,7 @@ public class TestOperModi extends TestCase {
assertEquals("temp9.c", aix.getFileName());
assertEquals(13, aix.getLineNumber());
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity());
assertEquals(" Operand must be a modifiable lvalue.",aix.getMessage());
assertEquals("Operand must be a modifiable lvalue.",aix.getMessage());
}
public TestOperModi( String name)
{

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -29,7 +29,7 @@ public class TestSyntaxError extends TestCase {
assertEquals("temp1.c", aix.getFileName());
assertEquals(5, aix.getLineNumber());
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity());
assertEquals(" Syntax error: possible missing ')'?",aix.getMessage());
assertEquals("Syntax error: possible missing ')'?",aix.getMessage());
}
public TestSyntaxError( String name)
{

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -30,7 +30,7 @@ public class TestUndeclIdent extends TestCase {
assertEquals("temp5.c", aix.getFileName());
assertEquals(5, aix.getLineNumber());
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity());
assertEquals(" Undeclared identifier y.",aix.getMessage());
assertEquals("Undeclared identifier y.",aix.getMessage());
}
public TestUndeclIdent( String name)
{

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -29,7 +29,7 @@ public class TestUnrecoverableError extends TestCase {
assertEquals("temp1.c", aix.getFileName());
assertEquals(5, aix.getLineNumber());
assertEquals(IMarkerGenerator.SEVERITY_ERROR_BUILD, aix.getSeverity());
assertEquals(" INTERNAL COMPILER ERROR",aix.getMessage());
assertEquals("INTERNAL COMPILER ERROR",aix.getMessage());
}
public TestUnrecoverableError( String name)
{

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2006, 2008 IBM Corporation and others.
* Copyright (c) 2006, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -55,7 +55,7 @@ public class XlcErrorParser extends AbstractErrorParser {
*/
@Override
public String getDesc(Matcher matcher) {
return " Macro name " + matcher.group(4) + " originally defined in file " + getFileName(matcher);
return "Macro name " + matcher.group(4) + " originally defined in file " + getFileName(matcher);
}
},
new ErrorPattern(Messages.XlcErrorParser_CompilerErrorPattern, 1, 2, 5, 0, -1) {

View file

@ -12,9 +12,9 @@
# Translators: do not translate this file. We currently do not support NL versions of the XL C/C++ compilers.
# "main.cpp", line 10.6: 1540-0064 (S) Syntax error: "name" was expected but "char" was found.
XlcErrorParser_CompilerErrorPattern=[\"]?(.*?)[\"]?, line ([0-9]+)\\.[0-9]+:( [0-9]*-[0-9]*)? \\(([USEWI])\\)(.*)
XlcErrorParser_CompilerErrorPattern=[\"]?(.*?)[\"]?, line ([0-9]+)\\.[0-9]+:( [0-9]*-[0-9]*)? \\(([USEWI])\\)\\s*(.*)
# "hello.c", line 5.9: 1506-358 (I) "MACRO" is defined on line 3 of hello.h.
XlcErrorParser_MacroRedefinitionErrorPattern=[\"]?(.*?)[\"]?, line ([0-9]+)\\.[0-9]+:( [0-9]*-[0-9]*)? \\(I\\) [\"]?(\\w*)[\"]? is defined on line ([0-9]+) of (.*)\\.
XlcErrorParser_MacroRedefinitionErrorPattern=[\"]?(.*?)[\"]?, line ([0-9]+)\\.[0-9]+:( [0-9]*-[0-9]*)? \\(I\\)\\s*[\"]?(\\w*)[\"]? is defined on line ([0-9]+) of (.*)\\.
XlcErrorParser_FlagUnrecoverable=U
XlcErrorParser_FlagSevere=S