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

org.eclipse.cdt.core

Fixed Bug 50821 - Freezes when opening / saving .c file 

org.eclipse.cdt.core.tests
	Added ScannerTestCase::testBug50821().
This commit is contained in:
John Camelon 2004-01-29 04:57:43 +00:00
parent a99b08ff8d
commit 878174520e
4 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,6 @@
2004-01-28 John Camelon
Added ScannerTestCase::testBug50821().
2004-01-27 John Camelon
Renamed ContextualParseTest to CompletionParseTest.
Updated COMPLETION_PARSE clients to use SINGLE_NAME_REFERENCE rather than STATEMENT_START.

View file

@ -1547,4 +1547,12 @@ public class ScannerTestCase extends BaseScannerTest
initializeScanner( buffer.toString(), ParserMode.COMPLETE_PARSE );
validateEOF();
}
public void testBug50821() throws Exception
{
Callback callback = new Callback( ParserMode.QUICK_PARSE );
initializeScanner( "\'\n\n\n", ParserMode.QUICK_PARSE, callback );
scanner.nextToken();
assertEquals( callback.problems.size(), 1 );
}
}

View file

@ -1,3 +1,6 @@
2004-01-28 John Camelon
Fixed Bug 50821 - Freezes when opening / saving .c file
2004-01-28 John Camelon
Fixed Bug 50711 - Wrong completion kind in a new expression

View file

@ -1841,7 +1841,7 @@ public class Scanner implements IScanner {
( c == NOCHAR ) )
{
handleProblem( IProblem.SCANNER_BAD_CHARACTER, new Character( (char)c ).toString(),beginOffset, false, true, throwExceptionOnBadCharacterRead );
c = ' ';
c = '\'';
}
// exit condition
if ( ( c =='\'' ) && ( prev != '\\' || prevPrev == '\\' ) ) break;