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:
parent
2e972fcc9a
commit
18ef4dfec9
1 changed files with 24 additions and 9 deletions
|
@ -31,16 +31,31 @@ import org.eclipse.cdt.internal.core.parser.QuickParseCallback;
|
||||||
*/
|
*/
|
||||||
public class SpeedTest extends TestCase {
|
public class SpeedTest extends TestCase {
|
||||||
|
|
||||||
public void test() throws Exception {
|
public static void main(String[] args) {
|
||||||
String code =
|
try {
|
||||||
"#include <windows.h>\n" +
|
new SpeedTest().runTest(1);
|
||||||
"#include <stdio.h>\n" +
|
} catch (Exception e) {
|
||||||
"#include <iostream>\n";
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reader reader = new StringReader(code);
|
public void test() throws Exception {
|
||||||
IScannerInfo info = mingwScannerInfo(false);
|
runTest(1);
|
||||||
//IScannerInfo info = msvcScannerInfo(quick);
|
}
|
||||||
testParse(reader, "text", false, info, ParserLanguage.CPP);
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue