modified: src/peers/gov/nasa/jpf/vm/JPF_java_lang_Runtime.java: Native peers.
modified: src/tests/gov/nasa/jpf/test/java/lang/RuntimeTest.java: Tests.
public void gc____V (MJIEnv env, int objref){
env.gc();
}
+
+ @MJI
+ public void halt__I__V (MJIEnv env, int clsObjRef, int ret) {
+ // TODO: System.exit should start shutdown handler (once supported)
+ // and call this method (copied code should be removed in System.exit)
+ ThreadInfo ti = env.getThreadInfo();
+ env.getVM().terminateProcess(ti);
+ }
@MJI
public int availableProcessors____I (MJIEnv env, int objref){
public class RuntimeTest extends TestJPF {
+ @Test
+ public void testExit() {
+ if (verifyNoPropertyViolation()) {
+ System.exit(1);
+ assert(false);
+ }
+ }
+
+ @Test
+ public void testHalt() {
+ if (verifyNoPropertyViolation()) {
+ Runtime.getRuntime().halt(1);
+ assert(false);
+ }
+ }
+
@Test
public void testAvailableProcessors() {