1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Merge remote-tracking branch 'cdt/master' into sd90

This commit is contained in:
Andrew Gvozdev 2013-01-21 18:52:54 -05:00
commit dcbf7b9406
25 changed files with 377 additions and 86 deletions

View file

@ -24,18 +24,13 @@
</repository>
</repositories>-->
<profiles>
<profile>
<id>production</id>
<properties>
<gdbPathOption>-Dcdt.tests.dsf.gdb.path=/opt/public/download-staging.priv/tools/cdt/gdb</gdbPathOption>
</properties>
</profile>
</profiles>
<properties>
<gdbPathOption>-Dcdt.tests.dsf.gdb.path=/opt/public/download-staging.priv/tools/cdt/gdb</gdbPathOption>
</properties>
<build>
<plugins>
<plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>

View file

@ -69,13 +69,17 @@ public class PlainTextExporter implements IMemoryExporter {
@Override
public void dispose()
{
fProperties.put(TRANSFER_FILE, fFileText.getText());
fProperties.put(TRANSFER_START, fStartText.getText());
fProperties.put(TRANSFER_END, fEndText.getText());
fProperties.put(TRANSFER_FILE, fFileText.getText().trim());
fProperties.put(TRANSFER_START, fStartText.getText().trim());
fProperties.put(TRANSFER_END, fEndText.getText().trim());
fStartAddress = getStartAddress();
fEndAddress = getEndAddress();
fOutputFile = getFile();
try
{
fStartAddress = getStartAddress();
fEndAddress = getEndAddress();
fOutputFile = getFile();
}
catch(Exception e) {}
super.dispose();
}
@ -203,7 +207,7 @@ public class PlainTextExporter implements IMemoryExporter {
dialog.setText(Messages.getString("PlainTextExporter.ChooseFile")); //$NON-NLS-1$
dialog.setFilterExtensions(new String[] { "*.*;*" } ); //$NON-NLS-1$
dialog.setFilterNames(new String[] { Messages.getString("Exporter.AllFiles") } ); //$NON-NLS-1$
dialog.setFileName(fFileText.getText());
dialog.setFileName(fFileText.getText().trim());
dialog.open();
String filename = dialog.getFileName();
@ -419,7 +423,7 @@ public class PlainTextExporter implements IMemoryExporter {
public File getFile()
{
return new File(fFileText.getText());
return new File(fFileText.getText().trim());
}
private void validate()
@ -436,6 +440,9 @@ public class PlainTextExporter implements IMemoryExporter {
if(length.compareTo(BigInteger.ZERO) <= 0)
isValid = false;
if ( fFileText.getText().trim().length() == 0 )
isValid = false;
File file = getFile();
if ( file != null ) {
File parentFile = file.getParentFile();
@ -457,7 +464,7 @@ public class PlainTextExporter implements IMemoryExporter {
fParentDialog.setValid(isValid);
}
public String getId()
{
return "PlainTextExporter"; //$NON-NLS-1$

View file

@ -76,13 +76,17 @@ public class PlainTextImporter implements IMemoryImporter {
@Override
public void dispose()
{
fProperties.put(TRANSFER_FILE, fFileText.getText());
fProperties.put(TRANSFER_START, fStartText.getText());
fProperties.put(TRANSFER_FILE, fFileText.getText().trim());
fProperties.put(TRANSFER_START, fStartText.getText().trim());
fProperties.put(TRANSFER_SCROLL_TO_START, fScrollToBeginningOnImportComplete.getSelection());
fStartAddress = getStartAddress();
fInputFile = getFile();
fScrollToStart = getScrollToStart();
try
{
fStartAddress = getStartAddress();
fInputFile = getFile();
fScrollToStart = getScrollToStart();
}
catch(Exception e) {}
super.dispose();
}
@ -157,7 +161,7 @@ public class PlainTextImporter implements IMemoryImporter {
dialog.setText(Messages.getString("PlainTextImporter.ChooseFile")); //$NON-NLS-1$
dialog.setFilterExtensions(new String[] { "*.*;*" } ); //$NON-NLS-1$
dialog.setFilterNames(new String[] { Messages.getString("Importer.AllFiles") } ); //$NON-NLS-1$
dialog.setFileName(fFileText.getText());
dialog.setFileName(fFileText.getText().trim());
dialog.open();
String filename = dialog.getFileName();
@ -226,6 +230,11 @@ public class PlainTextImporter implements IMemoryImporter {
try
{
getStartAddress();
if ( fFileText.getText().trim().length() == 0 )
isValid = false;
if(!getFile().exists()) {
isValid = false;
}
@ -256,7 +265,7 @@ public class PlainTextImporter implements IMemoryImporter {
public File getFile()
{
return new File(fFileText.getText());
return new File(fFileText.getText().trim());
}
public String getId()

View file

@ -69,13 +69,17 @@ public class RAWBinaryExporter implements IMemoryExporter
@Override
public void dispose()
{
fProperties.put(TRANSFER_FILE, fFileText.getText());
fProperties.put(TRANSFER_START, fStartText.getText());
fProperties.put(TRANSFER_END, fEndText.getText());
fProperties.put(TRANSFER_FILE, fFileText.getText().trim());
fProperties.put(TRANSFER_START, fStartText.getText().trim());
fProperties.put(TRANSFER_END, fEndText.getText().trim());
fStartAddress = getStartAddress();
fEndAddress = getEndAddress();
fOutputFile = getFile();
try
{
fStartAddress = getStartAddress();
fEndAddress = getEndAddress();
fOutputFile = getFile();
}
catch(Exception e) {}
super.dispose();
}
@ -204,7 +208,7 @@ public class RAWBinaryExporter implements IMemoryExporter
dialog.setText(Messages.getString("RAWBinaryExporter.ChooseFile")); //$NON-NLS-1$
dialog.setFilterExtensions(new String[] { "*.*;*" } ); //$NON-NLS-1$
dialog.setFilterNames(new String[] { Messages.getString("Exporter.AllFiles") } ); //$NON-NLS-1$
dialog.setFileName(fFileText.getText());
dialog.setFileName(fFileText.getText().trim());
dialog.open();
String filename = dialog.getFileName();
@ -421,7 +425,7 @@ public class RAWBinaryExporter implements IMemoryExporter
public File getFile()
{
return new File(fFileText.getText());
return new File(fFileText.getText().trim());
}
private void validate()
@ -438,6 +442,9 @@ public class RAWBinaryExporter implements IMemoryExporter
if(length.compareTo(BigInteger.ZERO) <= 0)
isValid = false;
if ( fFileText.getText().trim().length() == 0 )
isValid = false;
File file = getFile();
if ( file != null ) {
File parentFile = file.getParentFile();

View file

@ -71,13 +71,17 @@ public class RAWBinaryImporter implements IMemoryImporter {
@Override
public void dispose()
{
fProperties.put(TRANSFER_FILE, fFileText.getText());
fProperties.put(TRANSFER_START, fStartText.getText());
fProperties.put(TRANSFER_FILE, fFileText.getText().trim());
fProperties.put(TRANSFER_START, fStartText.getText().trim());
fProperties.put(TRANSFER_SCROLL_TO_START, fScrollToBeginningOnImportComplete.getSelection());
fStartAddress = getStartAddress();
fInputFile = getFile();
fScrollToStart = getScrollToStart();
try
{
fStartAddress = getStartAddress();
fInputFile = getFile();
fScrollToStart = getScrollToStart();
}
catch(Exception e) {}
super.dispose();
}
@ -137,7 +141,7 @@ public class RAWBinaryImporter implements IMemoryImporter {
dialog.setText(Messages.getString("RAWBinaryImporter.ChooseFile")); //$NON-NLS-1$
dialog.setFilterExtensions(new String[] { "*.*;*" } ); //$NON-NLS-1$
dialog.setFilterNames(new String[] { Messages.getString("Importer.AllFiles") } ); //$NON-NLS-1$
dialog.setFileName(fFileText.getText());
dialog.setFileName(fFileText.getText().trim());
dialog.open();
String filename = dialog.getFileName();
@ -206,6 +210,11 @@ public class RAWBinaryImporter implements IMemoryImporter {
try
{
getStartAddress();
if ( fFileText.getText().trim().length() == 0 )
isValid = false;
if(!getFile().exists()) {
isValid = false;
}
@ -236,7 +245,7 @@ public class RAWBinaryImporter implements IMemoryImporter {
public File getFile()
{
return new File(fFileText.getText());
return new File(fFileText.getText().trim());
}
public String getId()

View file

@ -68,9 +68,9 @@ public class SRecordExporter implements IMemoryExporter
{
public void dispose()
{
fProperties.put(TRANSFER_FILE, fFileText.getText());
fProperties.put(TRANSFER_START, fStartText.getText());
fProperties.put(TRANSFER_END, fEndText.getText());
fProperties.put(TRANSFER_FILE, fFileText.getText().trim());
fProperties.put(TRANSFER_START, fStartText.getText().trim());
fProperties.put(TRANSFER_END, fEndText.getText().trim());
try
{
@ -227,7 +227,7 @@ public class SRecordExporter implements IMemoryExporter
dialog.setText(Messages.getString("SRecordExporter.ChooseFile")); //$NON-NLS-1$
dialog.setFilterExtensions(new String[] { "*.*;*" } ); //$NON-NLS-1$
dialog.setFilterNames(new String[] { Messages.getString("Exporter.AllFiles") } ); //$NON-NLS-1$
dialog.setFileName(fFileText.getText());
dialog.setFileName(fFileText.getText().trim());
dialog.open();
String filename = dialog.getFileName();
@ -455,7 +455,7 @@ public class SRecordExporter implements IMemoryExporter
public File getFile()
{
return new File(fFileText.getText());
return new File(fFileText.getText().trim());
}
private void validate()
@ -472,6 +472,9 @@ public class SRecordExporter implements IMemoryExporter
if(length.compareTo(BigInteger.ZERO) <= 0)
isValid = false;
if ( fFileText.getText().trim().length() == 0 )
isValid = false;
File file = getFile();
if ( file != null ) {
File parentFile = file.getParentFile();

View file

@ -77,14 +77,20 @@ public class SRecordImporter implements IMemoryImporter {
{
public void dispose()
{
fProperties.put(TRANSFER_FILE, fFileText.getText());
fProperties.put(TRANSFER_START, fStartText.getText());
fProperties.put(TRANSFER_FILE, fFileText.getText().trim());
fProperties.put(TRANSFER_START, fStartText.getText().trim());
fProperties.put(TRANSFER_SCROLL_TO_START, fScrollToBeginningOnImportComplete.getSelection());
fProperties.put(TRANSFER_CUSTOM_START_ADDRESS, fComboRestoreToThisAddress.getSelection());
fStartAddress = getStartAddress();
fInputFile = getFile();
fScrollToStart = getScrollToStart();
try
{
if(fProperties.getBoolean(TRANSFER_CUSTOM_START_ADDRESS)) {
fStartAddress = getStartAddress();
}
fInputFile = getFile();
fScrollToStart = getScrollToStart();
}
catch(Exception e) {}
super.dispose();
}
@ -187,7 +193,7 @@ public class SRecordImporter implements IMemoryImporter {
dialog.setText(Messages.getString("SRecordImporter.ChooseFile")); //$NON-NLS-1$
dialog.setFilterExtensions(new String[] { "*.*;*" } ); //$NON-NLS-1$
dialog.setFilterNames(new String[] { Messages.getString("Importer.AllFiles") } ); //$NON-NLS-1$
dialog.setFileName(fFileText.getText());
dialog.setFileName(fFileText.getText().trim());
dialog.open();
String filename = dialog.getFileName();
@ -289,11 +295,11 @@ public class SRecordImporter implements IMemoryImporter {
getStartAddress();
}
boolean restoreToAddressFromFile = fComboRestoreToFileAddress.getSelection();
if ( restoreToAddressFromFile ) {
if(!getFile().exists()) {
isValid = false;
}
if ( fFileText.getText().trim().length() == 0 )
isValid = false;
if(!getFile().exists()) {
isValid = false;
}
}
catch(Exception e)
@ -327,7 +333,7 @@ public class SRecordImporter implements IMemoryImporter {
public File getFile()
{
return new File(fFileText.getText());
return new File(fFileText.getText().trim());
}
public String getId()

View file

@ -19,26 +19,34 @@ public class AllXlcErrorParserTests {
}
public static Test suite() {
TestSuite suite = new TestSuite(
"Testsuite for xlc compiler error parser");
TestSuite suite = new TestSuite("Testsuite for xlc compiler error parser");
//$JUnit-BEGIN$
suite.addTestSuite(TestUndeclIdent.class);
suite.addTestSuite(TestMissingArg.class);
suite.addTestSuite(TestFloatingPoint.class);
suite.addTestSuite(TestFuncArg.class);
suite.addTestSuite(TestOperModi.class);
suite.addTestSuite(TestConditional.class);
suite.addTestSuite(TestSyntaxError.class);
suite.addTestSuite(TestNoFuncProto.class);
suite.addTestSuite(TestInformationalMessage_1.class);
suite.addTestSuite(TestInformationalMessage_2.class);
suite.addTestSuite(TestInformationalMessage_3.class);
suite.addTestSuite(TestWarning_1.class);
suite.addTestSuite(TestError_1.class);
suite.addTestSuite(TestSevereError_1.class);
suite.addTestSuite(TestSevereError_2.class);
suite.addTestSuite(TestSevereError_3.class);
suite.addTestSuite(TestSevereError_4.class);
suite.addTestSuite(TestSevereError_5.class);
suite.addTestSuite(TestUnrecoverableError_1.class);
suite.addTestSuite(TestUnrecoverableError_2.class);
suite.addTestSuite(TestUnrecoverableError_3.class);
suite.addTestSuite(TestCompatibility.class);
suite.addTestSuite(TestUnrecoverableError.class);
suite.addTestSuite(TestRedefinition.class);
suite.addTestSuite(TestRedeclaration.class);
suite.addTestSuite(TestCommandOptionNotRecognized.class);
suite.addTestSuite(TestLinkerCommandOptionNotRecognized.class);
suite.addTestSuite(TestLinkerUndefinedSymbol.class);
suite.addTestSuite(TestLinkerDuplicateSymbol.class);
suite.addTestSuite(TestLinkerSevereError.class);
suite.addTestSuite(TestLinkerErrorWhileReading.class);
suite.addTestSuite(TestLinkerInfo.class);
//$JUnit-END$
return suite;
}

View file

@ -0,0 +1,39 @@
/*******************************************************************************
* Copyright (c) 2013, 2013 Andrew Gvozdev 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.errorparsers.xlc.tests;
import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestCommandOptionNotRecognized extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
* XlcErrorParser class. A warning message generated by
* xlc compiler about command options is given as
* input for testing.
*/
public void testparseLine()
{
XlcErrorParserTester aix = new XlcErrorParserTester();
aix.parseLine(err_msg);
assertEquals("", aix.getFileName(0));
assertEquals(0, aix.getLineNumber(0));
assertEquals(IMarkerGenerator.SEVERITY_WARNING, aix.getSeverity(0));
assertEquals("command option 9 is not recognized - passed to ld",aix.getMessage(0));
}
public TestCommandOptionNotRecognized(String name)
{
super(name);
err_msg = "/usr/vacpp/bin/xlc: 1501-216 command option 9 is not recognized - passed to ld";
}
}

View file

@ -16,7 +16,7 @@ import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestMissingArg extends TestCase {
public class TestError_1 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
@ -33,7 +33,7 @@ public class TestMissingArg extends TestCase {
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity(0));
assertEquals("Missing argument(s).",aix.getMessage(0));
}
public TestMissingArg( String name)
public TestError_1( String name)
{
super(name);
err_msg = "\"temp8.c\", line 9.17: 1506-098 (E) "

View file

@ -16,7 +16,7 @@ import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestConditional extends TestCase {
public class TestInformationalMessage_1 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
@ -32,7 +32,7 @@ public class TestConditional extends TestCase {
assertEquals(IMarkerGenerator.SEVERITY_INFO, aix.getSeverity(0));
assertEquals("The then branch of conditional is an empty statement.",aix.getMessage(0));
}
public TestConditional( String name)
public TestInformationalMessage_1( String name)
{
super(name);
err_msg = "\"temp8.c\", line 12.9: 1506-478 (I) " +

View file

@ -0,0 +1,39 @@
/*******************************************************************************
* Copyright (c) 2013, 2013 Andrew Gvozdev 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.errorparsers.xlc.tests;
import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestInformationalMessage_2 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
* XlcErrorParser class. A variant of informational message generated by
* xlc compiler with no file or line is given as
* input for testing.
*/
public void testparseLine()
{
XlcErrorParserTester aix = new XlcErrorParserTester();
aix.parseLine(err_msg);
assertEquals("", aix.getFileName(0));
assertEquals(0, aix.getLineNumber(0));
assertEquals(IMarkerGenerator.SEVERITY_INFO, aix.getSeverity(0));
assertEquals("clazz::fun(): Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.",aix.getMessage(0));
}
public TestInformationalMessage_2( String name)
{
super(name);
err_msg = " 1500-030: (I) INFORMATION: clazz::fun(): Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.";
}
}

View file

@ -0,0 +1,38 @@
/*******************************************************************************
* Copyright (c) 2013, 2013 Andrew Gvozdev 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.errorparsers.xlc.tests;
import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestInformationalMessage_3 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
* XlcErrorParser class. A variant of informational message generated by
* xlc compiler is given as input for testing.
*/
public void testparseLine()
{
XlcErrorParserTester aix = new XlcErrorParserTester();
aix.parseLine(err_msg);
assertEquals("", aix.getFileName(0));
assertEquals(0, aix.getLineNumber(0));
assertEquals(IMarkerGenerator.SEVERITY_INFO, aix.getSeverity(0));
assertEquals("Global variable \"__td __td__Q2_3std13runtime_error\" is not used.",aix.getMessage(0));
}
public TestInformationalMessage_3( String name)
{
super(name);
err_msg = "1540-5336 (I) Global variable \"__td __td__Q2_3std13runtime_error\" is not used.";
}
}

View file

@ -0,0 +1,40 @@
/*******************************************************************************
* Copyright (c) 2006, 2009 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.errorparsers.xlc.tests;
import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestLinkerCommandOptionNotRecognized extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
* XlcErrorParser class. A warning message generated by
* xlc linker about command options is given as
* input for testing.
*/
public void testparseLine()
{
XlcErrorParserTester aix = new XlcErrorParserTester();
aix.parseLine(err_msg);
assertEquals("", aix.getFileName(0));
assertEquals(0, aix.getLineNumber(0));
assertEquals(IMarkerGenerator.SEVERITY_WARNING, aix.getSeverity(0));
assertEquals("The -9 flag is not recognized.",aix.getMessage(0));
}
public TestLinkerCommandOptionNotRecognized(String name)
{
super(name);
err_msg = "ld: 0706-012 The -9 flag is not recognized.";
}
}

View file

@ -14,7 +14,7 @@ import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestSyntaxError extends TestCase {
public class TestSevereError_1 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
@ -31,7 +31,7 @@ public class TestSyntaxError extends TestCase {
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity(0));
assertEquals("Syntax error: possible missing ')'?",aix.getMessage(0));
}
public TestSyntaxError( String name)
public TestSevereError_1( String name)
{
super(name);
err_msg = "\"temp1.c\", line 5.1: 1506-276 (S) "

View file

@ -15,7 +15,7 @@ import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestUndeclIdent extends TestCase {
public class TestSevereError_2 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
@ -32,7 +32,7 @@ public class TestUndeclIdent extends TestCase {
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity(0));
assertEquals("Undeclared identifier y.",aix.getMessage(0));
}
public TestUndeclIdent( String name)
public TestSevereError_2( String name)
{
super(name);
err_msg = "\"temp5.c\", line 5.9: 1506-045 (S) " +

View file

@ -16,7 +16,7 @@ import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestFloatingPoint extends TestCase {
public class TestSevereError_3 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
@ -34,7 +34,7 @@ public class TestFloatingPoint extends TestCase {
assertEquals("Floating point constant 10.23.3 is not valid",
aix.getMessage(0));
}
public TestFloatingPoint( String name)
public TestSevereError_3( String name)
{
super(name);
err_msg = "\"temp9.c\", line 11.18: 1506-189 (S) " +

View file

@ -15,7 +15,7 @@ import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestFuncArg extends TestCase {
public class TestSevereError_4 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
@ -34,7 +34,7 @@ public class TestFuncArg extends TestCase {
"\"int\" and \"char*\" is not allowed.",
aix.getMessage(0));
}
public TestFuncArg( String name)
public TestSevereError_4( String name)
{
super(name);
err_msg = "\"temp9.c\", line 12.18: 1506-280 (S) " +

View file

@ -15,7 +15,7 @@ import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestOperModi extends TestCase {
public class TestSevereError_5 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
@ -32,7 +32,7 @@ public class TestOperModi extends TestCase {
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity(0));
assertEquals("Operand must be a modifiable lvalue.",aix.getMessage(0));
}
public TestOperModi( String name)
public TestSevereError_5( String name)
{
super(name);
err_msg = "\"temp9.c\", line 13.9: 1506-025 (S) " +

View file

@ -14,7 +14,7 @@ import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestUnrecoverableError extends TestCase {
public class TestUnrecoverableError_1 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
@ -31,7 +31,7 @@ public class TestUnrecoverableError extends TestCase {
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity(0));
assertEquals("INTERNAL COMPILER ERROR",aix.getMessage(0));
}
public TestUnrecoverableError( String name)
public TestUnrecoverableError_1( String name)
{
super(name);
err_msg = "\"temp1.c\", line 5.1: 1506-001 (U) "

View file

@ -0,0 +1,39 @@
/*******************************************************************************
* Copyright (c) 2013, 2013 Andrew Gvozdev 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.errorparsers.xlc.tests;
import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestUnrecoverableError_2 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
* XlcErrorParser class. A variant of error message generated by
* xlc compiler with unrecoverable severity (U) is given as
* input for testing.
*/
public void testparseLine()
{
XlcErrorParserTester aix = new XlcErrorParserTester();
aix.parseLine(err_msg);
assertEquals("", aix.getFileName(0));
assertEquals(0, aix.getLineNumber(0));
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity(0));
assertEquals("An error occurred during code generation. The code generation return code was 1.",aix.getMessage(0));
}
public TestUnrecoverableError_2( String name)
{
super(name);
err_msg = "1586-346 (U) An error occurred during code generation. The code generation return code was 1.";
}
}

View file

@ -0,0 +1,39 @@
/*******************************************************************************
* Copyright (c) 2013, 2013 Andrew Gvozdev 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
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.errorparsers.xlc.tests;
import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestUnrecoverableError_3 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
* XlcErrorParser class. A variant of error message generated by
* xlc compiler with unrecoverable severity (U) is given as
* input for testing.
*/
public void testparseLine()
{
XlcErrorParserTester aix = new XlcErrorParserTester();
aix.parseLine(err_msg);
assertEquals("", aix.getFileName(0));
assertEquals(0, aix.getLineNumber(0));
assertEquals(IMarkerGenerator.SEVERITY_ERROR_RESOURCE, aix.getSeverity(0));
assertEquals("INTERNAL COMPILER ERROR while compiling ----. Compilation ended. Contact your Service Representative and provide the following information: Internal abort. For more information visit: http://www.ibm.com/support/docview.wss?uid=swg21110810",aix.getMessage(0));
}
public TestUnrecoverableError_3( String name)
{
super(name);
err_msg = " 1500-004: (U) INTERNAL COMPILER ERROR while compiling ----. Compilation ended. Contact your Service Representative and provide the following information: Internal abort. For more information visit: http://www.ibm.com/support/docview.wss?uid=swg21110810";
}
}

View file

@ -14,7 +14,7 @@ import junit.framework.TestCase;
import org.eclipse.cdt.core.IMarkerGenerator;
public class TestNoFuncProto extends TestCase {
public class TestWarning_1 extends TestCase {
String err_msg;
/**
* This function tests parseLine function of the
@ -30,7 +30,7 @@ public class TestNoFuncProto extends TestCase {
assertEquals(IMarkerGenerator.SEVERITY_WARNING, aix.getSeverity(0));
assertEquals("No function prototype given for \"printf\".",aix.getMessage(0));
}
public TestNoFuncProto( String name)
public TestWarning_1( String name)
{
super(name);
err_msg = "\"temp1.c\", line 5.9: 1506-304 (W) "

View file

@ -35,10 +35,19 @@ CDTXLCErrorParser.pattern.redeclaration.crossreference=Redeclaration of $4 diffe
CDTXLCErrorParser.pattern.error="?([^"]*)"?, line ([0-9]+)\\.[0-9]+:( [0-9]*-[0-9]*)? \\([USE]\\)\\s*(.*)
CDTXLCErrorParser.pattern.warning="?([^"]*)"?, line ([0-9]+)\\.[0-9]+:( [0-9]*-[0-9]*)? \\(W\\)\\s*(.*)
CDTXLCErrorParser.pattern.info="?([^"]*)"?, line ([0-9]+)\\.[0-9]+:( [0-9]*-[0-9]*)? \\(I\\)\\s*(.*)
# 1586-346 (U) An error occurred during code generation. The code generation return code was 1.
CDTXLCErrorParser.pattern.error2=\\s*([0-9]*-[0-9]*:?)? \\([USE]\\)\\s*(.*)
# /usr/vacpp/bin/xlc: 1501-216 command option 9 is not recognized - passed to ld
CDTXLCErrorParser.pattern.warning2=/[/\\w]+: [0-9]+-[0-9]+\\s*(.*)
# 1500-030: (I) INFORMATION: clazz::fun(): Additional optimization may be attained by recompiling and specifying MAXMEM option with a value greater than 8192.
# 1540-5336 (I) Global variable "__td __td__Q2_3std13runtime_error" is not used.
CDTXLCErrorParser.pattern.info2=\\s*([0-9]*-[0-9]*:?)? \\(I\\)( INFORMATION:)?\\s*(.*)
# ld: 0711-224 WARNING: Duplicate symbol: symboldupe
# WARNING, ERROR, SEVERE ERROR etc.
CDTXLCErrorParser.pattern.ld.error=ld: ([0-9]+-[0-9]+).*ERROR:\\s*(.*)
CDTXLCErrorParser.pattern.ld.warning=ld: ([0-9]+-[0-9]+)\\s*WARNING:\\s*(.*)
# ld: 0706-012 The -9 flag is not recognized.
CDTXLCErrorParser.pattern.ld.warning2=ld: 0706-012\\s*(.*)
# ld: 0711-987 Error occurred while reading file
CDTXLCErrorParser.pattern.ld.error2=ld: ([0-9]+-[0-9]+)\\s*(Error .*)
# ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

View file

@ -11,11 +11,15 @@
<pattern regex="%CDTXLCErrorParser.pattern.macro" severity="Warning" file-expr="$1" line-expr="$2" description-expr="%CDTXLCErrorParser.pattern.macro.crossreference" eat-processed-line="true" />
<pattern regex="%CDTXLCErrorParser.pattern.redeclaration" severity="Error" file-expr="$6" line-expr="$5" description-expr="%CDTXLCErrorParser.pattern.redeclaration.crossreference" eat-processed-line="false" />
<pattern regex="%CDTXLCErrorParser.pattern.error" severity="Error" file-expr="$1" line-expr="$2" description-expr="$4" eat-processed-line="true"/>
<pattern regex="%CDTXLCErrorParser.pattern.error2" severity="Error" file-expr="" line-expr="" description-expr="$2" eat-processed-line="true"/>
<pattern regex="%CDTXLCErrorParser.pattern.warning" severity="Warning" file-expr="$1" line-expr="$2" description-expr="$4" eat-processed-line="true"/>
<pattern regex="%CDTXLCErrorParser.pattern.warning2" severity="Warning" file-expr="" line-expr="" description-expr="$1" eat-processed-line="true"/>
<pattern regex="%CDTXLCErrorParser.pattern.info" severity="Info" file-expr="$1" line-expr="$2" description-expr="$4" eat-processed-line="true"/>
<pattern regex="%CDTXLCErrorParser.pattern.info2" severity="Info" file-expr="" line-expr="" description-expr="$3" eat-processed-line="true"/>
<pattern regex="%CDTXLCErrorParser.pattern.ld.error" severity="Error" file-expr="" line-expr="" description-expr="$2" eat-processed-line="true"/>
<pattern regex="%CDTXLCErrorParser.pattern.ld.error2" severity="Error" file-expr="" line-expr="" description-expr="$2" eat-processed-line="true"/>
<pattern regex="%CDTXLCErrorParser.pattern.ld.warning" severity="Warning" file-expr="" line-expr="" description-expr="$2" eat-processed-line="true"/>
<pattern regex="%CDTXLCErrorParser.pattern.ld.warning2" severity="Warning" file-expr="" line-expr="" description-expr="$1" eat-processed-line="true"/>
<pattern regex="%CDTXLCErrorParser.pattern.ld.info" severity="Info" file-expr="" line-expr="" description-expr="$2" eat-processed-line="true"/>
</errorparser>
</extension>