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

no need to run indexer for these tests

This commit is contained in:
Alena Laskavaia 2010-05-13 02:05:53 +00:00
parent b7eb03f5f9
commit 4f2aa8c7db
2 changed files with 5 additions and 9 deletions

View file

@ -82,11 +82,11 @@ public class CheckerTestCase extends CodanTestCase {
public void loadCodeAndRun(String code) {
loadcode(code);
runOnProject();
runCodan();
}
public void loadCodeAndRunCpp(String code) {
loadcode(code, true);
runOnProject();
runCodan();
}
/**
*

View file

@ -120,12 +120,7 @@ public class CodanTestCase extends BaseTestCase {
}
}, null);
mj.join();
// Index the cproject
CCorePlugin.getIndexManager().setIndexerId(cprojects[0],
IPDOMManager.ID_FAST_INDEXER);
// wait until the indexer is done
assertTrue(CCorePlugin.getIndexManager().joinIndexer(360000,
new NullProgressMonitor()));
} finally {
mj.dispose();
}
@ -142,6 +137,7 @@ public class CodanTestCase extends BaseTestCase {
// Index the cproject
CCorePlugin.getIndexManager().setIndexerId(cproject,
IPDOMManager.ID_FAST_INDEXER);
CCorePlugin.getIndexManager().reindex(cproject);
// wait until the indexer is done
assertTrue(CCorePlugin.getIndexManager().joinIndexer(1000 * 60, // 1 min
new NullProgressMonitor()));
@ -191,7 +187,7 @@ public class CodanTestCase extends BaseTestCase {
}
public File loadcode(String code, boolean cpp) {
String ext = cpp ? ".cc" : ".c"; //$NON-NLS-1$ //$NON-NLS-2$
String ext = cpp ? ".cpp" : ".c"; //$NON-NLS-1$ //$NON-NLS-2$
File testFile = null;
try {
testFile = File.createTempFile("test", ext, tmpDir); //$NON-NLS-1$