This is the mail archive of the mauve-discuss@sources.redhat.com mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question about PipedInputStream available method


     
In the gnu/testlet/java/io/PipedStream/Test.java code, there is a call to method available() which Returns the number of bytes that can be read from this input stream without blocking. The first call to the method returns zero which causes the test to fail. Should the code be change to 
harness.check(pis.available() >= 0, "available()");



 // Now set up our reader
      PipedInputStream pis = new PipedInputStream();
      pis.connect(pos);
      new Thread(pstw).start();
           harness.check(pis.available() > 0, "available()");

Pat Ellis
SDE Build and Test Team
Phone:      (919) 531-0355   
R2263     Patrick dot Ellis at sas dot com
SAS...  The Power to Know


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]