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

Update to the speed test.

This commit is contained in:
Doug Schaefer 2004-06-03 19:38:06 +00:00
parent 2e972fcc9a
commit 18ef4dfec9

View file

@ -31,16 +31,31 @@ import org.eclipse.cdt.internal.core.parser.QuickParseCallback;
*/
public class SpeedTest extends TestCase {
public void test() throws Exception {
String code =
"#include <windows.h>\n" +
"#include <stdio.h>\n" +
"#include <iostream>\n";
public static void main(String[] args) {
try {
new SpeedTest().runTest(1);
} catch (Exception e) {
e.printStackTrace();
}
}
Reader reader = new StringReader(code);
IScannerInfo info = mingwScannerInfo(false);
//IScannerInfo info = msvcScannerInfo(quick);
testParse(reader, "text", false, info, ParserLanguage.CPP);
public void test() throws Exception {
runTest(1);
}
public void runTest(int n) throws Exception {
for (int i = 0; i < n; ++i) {
System.gc();
String code =
"#include <windows.h>\n" +
"#include <stdio.h>\n" +
"#include <iostream>\n";
Reader reader = new StringReader(code);
IScannerInfo info = mingwScannerInfo(false);
//IScannerInfo info = msvcScannerInfo(quick);
testParse(reader, "text", false, info, ParserLanguage.CPP);
}
}
/**