mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-02 22:55:26 +02:00
bug 387729: GCCScannerInfoConsoleParserTests fails consistently for me
This commit is contained in:
parent
84b9869577
commit
6b0b057af3
3 changed files with 7 additions and 9 deletions
|
@ -21,11 +21,11 @@ import org.eclipse.cdt.make.internal.core.scannerconfig.gnu.GCCScannerInfoConsol
|
|||
|
||||
/**
|
||||
* Scanner configuration console parser tests
|
||||
*
|
||||
*
|
||||
* @author vhirsl
|
||||
*/
|
||||
public class GCCScannerInfoConsoleParserTests extends BaseBOPConsoleParserTests {
|
||||
|
||||
|
||||
public static TestSuite suite() {
|
||||
return suite(GCCScannerInfoConsoleParserTests.class);
|
||||
}
|
||||
|
@ -46,10 +46,10 @@ public class GCCScannerInfoConsoleParserTests extends BaseBOPConsoleParserTests
|
|||
super.tearDown();
|
||||
fOutputParser.shutdown();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Tests GCCScannerInfoConsoleParser. Utility object not provided.
|
||||
* Only tests parsing of the input (make build output)
|
||||
* Only tests parsing of the input (make build output)
|
||||
*/
|
||||
public void testParsingIncludePaths() {
|
||||
fOutputParser.processLine("gcc -I /dir/include -I c:\\dir\\include -ID:/dir/include -c test.c"); // absolute paths //$NON-NLS-1$
|
||||
|
@ -68,7 +68,7 @@ public class GCCScannerInfoConsoleParserTests extends BaseBOPConsoleParserTests
|
|||
fOutputParser.processLine("gcc -Imultiline2 \\"); //$NON-NLS-1$
|
||||
fOutputParser.processLine("-Imultiline3\\"); //$NON-NLS-1$
|
||||
fOutputParser.processLine(" -DAA=\"BB\" test.c"); //$NON-NLS-1$
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> sumIncludes = fCollector.getCollectedScannerInfo(null, ScannerInfoTypes.INCLUDE_PATHS);
|
||||
assertTrue(sumIncludes.contains("/dir/include")); //$NON-NLS-1$
|
||||
|
|
|
@ -94,8 +94,7 @@ public abstract class AbstractGCCBOPConsoleParser implements IScannerInfoConsole
|
|||
*/
|
||||
@Override
|
||||
public boolean processLine(String line) {
|
||||
line= line.trim();
|
||||
if (line.length() == 0) {
|
||||
if (line.trim().length() == 0) {
|
||||
return false;
|
||||
}
|
||||
boolean rc = false;
|
||||
|
|
|
@ -110,8 +110,7 @@ public abstract class AbstractXLCBuildOutputParser implements IScannerInfoConsol
|
|||
*/
|
||||
@Override
|
||||
public boolean processLine(String line) {
|
||||
line= line.trim();
|
||||
if (line.length() == 0) {
|
||||
if (line.trim().length() == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue