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

Fix random content assist test failures

This commit is contained in:
Anton Leherbauer 2008-03-28 16:15:50 +00:00
parent 15447a0c0b
commit db312ccd1b

View file

@ -168,7 +168,11 @@ public class CompletionTests_PlainC extends AbstractContentAssistTest {
assertTrue("No cursor location specified", fCursorOffset >= 0); assertTrue("No cursor location specified", fCursorOffset >= 0);
sourceContent.delete(fCursorOffset, fCursorOffset+CURSOR_LOCATION_TAG.length()); sourceContent.delete(fCursorOffset, fCursorOffset+CURSOR_LOCATION_TAG.length());
assertNotNull(createFile(project, HEADER_FILE_NAME, headerContent)); assertNotNull(createFile(project, HEADER_FILE_NAME, headerContent));
return createFile(project, SOURCE_FILE_NAME, sourceContent.toString()); IFile sourceFile= createFile(project, SOURCE_FILE_NAME, sourceContent.toString());
// for some unknown reason re-indexing is necessary,
// otherwise tests fail at random
CCorePlugin.getIndexManager().reindex(fCProject);
return sourceFile;
} }
protected void assertCompletionResults(String[] expected) throws Exception { protected void assertCompletionResults(String[] expected) throws Exception {