commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject cvs commit: jakarta-commons/io/src/test/org/apache/commons/io/input SwappedDataInputStreamTest.java
Date Sun, 29 Feb 2004 22:03:45 GMT
bayard      2004/02/29 14:03:45

  Modified:    io/src/test/org/apache/commons/io/input
                        SwappedDataInputStreamTest.java
  Log:
  readFully tested
  
  Revision  Changes    Path
  1.9       +8 -4      jakarta-commons/io/src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java
  
  Index: SwappedDataInputStreamTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/io/src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- SwappedDataInputStreamTest.java	29 Feb 2004 21:58:47 -0000	1.8
  +++ SwappedDataInputStreamTest.java	29 Feb 2004 22:03:45 -0000	1.9
  @@ -35,13 +35,14 @@
   public class SwappedDataInputStreamTest extends TestCase {
   
       private SwappedDataInputStream sdis;
  +    private byte[] bytes;
   
       public SwappedDataInputStreamTest(String name) {
           super(name);
       }
   
       public void setUp() {
  -        byte[] bytes = new byte[] {
  +        bytes = new byte[] {
               0x01,
               0x02,
               0x03,
  @@ -79,10 +80,13 @@
           assertEquals( Float.intBitsToFloat(0x04030201), this.sdis.readFloat(), 0 );
       }
   
  -    /*
       public void testReadFully() throws IOException {
  +        byte[] bytesIn = new byte[8];
  +        this.sdis.readFully(bytesIn);
  +        for( int i=0; i<8; i++) {
  +            assertEquals( bytes[i], bytesIn[i] );
  +        }
       }
  -    */
   
       public void testReadInt() throws IOException {
           assertEquals( (int) 0x04030201, this.sdis.readInt() );
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message