Java Reference
In-Depth Information
You can have as many configurations as you like. To run or debug a particular configu-
ration, click Run ! Run ... or Run ! Debug ... menu, select the conguration, and click
Run or Debug. The output ( STDOUT and STDERR ) messages from the compiler are redirected
to the Console pane.
A.7 Testing Extensions toj--
We test extensions to the j-- language that compile to the JVM target using a JUnit test
framework. The framework supports writing conformance and deviance tests in order to
test the compiler; it also supports writing JUnit test cases to run the pass tests.
A pass test is a j-- test program that is syntactically and semantically correct. When
such a program is compiled using j--, the compiler should report no error(s) and should
generate class file(s) for the program. A fail test is a j-- test program that has syntactic
and/or semantic error(s). When such a program is compiled using j--, the compiler should
report the error(s) and exit gracefully. It should not produce class files for such programs.
The Ant targets, runCompilerTests and runCompilerTestsUsingJavaCC , attempt at
compiling the pass and fail tests using j--, and running the test suite for the pass tests.
Any pass test that compiles with errors or produces incorrect results would result in failed
JUnit assertions. Any fail test that compiles successfully would also result in a failed JUnit
assertions.
Chapter 1 describes how to add a simple extension (the division operator) to j-- and
how to test the extension using the JUnit test framework. Appendix E describes the SPIM
target and how to compile j-- programs for that target.
A.8 Further Readings
See the Java Development User Guide in [Eclipse, 2011] for more on how to run, debug,
and test your programs using Eclipse.
 
Search WWH ::




Custom Search