[Mono-list] Jacks Compiler Test Suite
Alexander Klyubin
klyubin@aqris.com
Sat, 17 Nov 2001 12:12:52 +0000
In one of the projects (http://www.refactorit.com) of the company I work
for it is necessary to be able to parse Java code into ASG. We found
ourselves writing an automated test suite with different code snippets
that our parser couldn't parse and then worked towards fixing the bugs
in the parser.
Later we discovered an excellend suite of several thousand of ready-made
Java compiler tests. Namely, the Jacks project
(http://www-124.ibm.com/developerworks/oss/jacks/). Jacks test suite
started as a part of open-source Java compiler jikes. Each test is
basically one or more .java files that must either compile or fail. So
the tests only check the parser part of compiler. We integrated roughly
half of this test suite into our project. Now we have 1350 or so parsing
tests which cover most aspects of Java Language Specification. This is
much better than 50 or so we had prior to this.
I'm not aware of any such project for C# compiler. But, at first one can
probably borrow many test cases from Jacks test suite and use them in
Mono C# compiler test suite. Manual inspection and modification of tests
will be required because those are Java tests. But I believe Mono #C
compiler coould import at least thousand tests or so. Additionally, if
might be a good idea to start a separate (sub)project for this. Because
having such a freely available and large test suite pays for other
projects creating C# compiler or parser.
Regards,
Alexander Klyubin