modified: src/classes/java/lang/System.java: Custom instance with fix.
modified: src/tests/gov/nasa/jpf/test/java/lang/SystemTest.java: Unit test.
+import java.io.BufferedInputStream;
import java.io.InputStream;
import java.io.PrintStream;
import java.nio.channels.Channel;
import java.io.InputStream;
import java.io.PrintStream;
import java.nio.channels.Channel;
static Properties properties;
static Properties properties;
- public static InputStream in; // new BufferedInputStream(...); // <2do> not yet
+ public static InputStream in = new InputStream() {
+ public int available() { return 0; }
+ public int read() { return -1; }
+ public int read(byte[] b, int off, int len) { return 0; }
+ public int read(byte[] b) { return 0; }
+ };
+
public static PrintStream out;
public static PrintStream err;
public static PrintStream out;
public static PrintStream err;
import gov.nasa.jpf.util.test.TestJPF;
import gov.nasa.jpf.vm.Verify;
import gov.nasa.jpf.util.test.TestJPF;
import gov.nasa.jpf.vm.Verify;
+import java.io.IOException;
+
import org.junit.Test;
/**
import org.junit.Test;
/**
+
+ @Test
+ public void testSystemIn() {
+ try {
+ if (verifyNoPropertyViolation()) {
+ assert(System.in.available() == 0);
+ }
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ }