activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r915989 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/ main/decaf/util/zip/ test/ test/decaf/util/zip/
Date Wed, 24 Feb 2010 21:56:18 GMT
Author: tabish
Date: Wed Feb 24 21:56:17 2010
New Revision: 915989

URL: http://svn.apache.org/viewvc?rev=915989&view=rev
Log:
http://issues.apache.org/activemq/browse/AMQCPP-287

Adds CheckedInputStream and CheckedOutputStream plus unit tests.

Added:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.cpp
  (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.h
  (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedOutputStream.cpp
  (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedOutputStream.h
  (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.cpp
  (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.h
  (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedOutputStreamTest.cpp
  (with props)
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedOutputStreamTest.h
  (with props)
Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am?rev=915989&r1=915988&r2=915989&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am Wed Feb 24 21:56:17 2010
@@ -591,6 +591,8 @@
     decaf/util/logging/XMLFormatter.cpp \
     decaf/util/zip/Adler32.cpp \
     decaf/util/zip/CRC32.cpp \
+    decaf/util/zip/CheckedInputStream.cpp \
+    decaf/util/zip/CheckedOutputStream.cpp \
     decaf/util/zip/Deflater.cpp \
     decaf/util/zip/DeflaterOutputStream.cpp \
     decaf/util/zip/Inflater.cpp \
@@ -1343,6 +1345,8 @@
     decaf/util/logging/XMLFormatter.h \
     decaf/util/zip/Adler32.h \
     decaf/util/zip/CRC32.h \
+    decaf/util/zip/CheckedInputStream.h \
+    decaf/util/zip/CheckedOutputStream.h \
     decaf/util/zip/Checksum.h \
     decaf/util/zip/DataFormatException.h \
     decaf/util/zip/Deflater.h \

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.cpp?rev=915989&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.cpp
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.cpp
Wed Feb 24 21:56:17 2010
@@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "CheckedInputStream.h"
+
+#include <decaf/lang/Math.h>
+
+using namespace decaf;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::lang::exceptions;
+using namespace decaf::util;
+using namespace decaf::util::zip;
+
+////////////////////////////////////////////////////////////////////////////////
+CheckedInputStream::CheckedInputStream( InputStream* inputStream, Checksum* sum, bool own
)
+ :  FilterInputStream( inputStream, own ), sum( sum ) {
+
+    if( sum == NULL ) {
+        throw NullPointerException(
+            __FILE__, __LINE__, "The Checksum instance cannot be NULL." );
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+CheckedInputStream::~CheckedInputStream() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+std::size_t CheckedInputStream::skip( std::size_t num ) throw( decaf::io::IOException ) {
+
+    try{
+
+        if( num == 0 ) {
+            return 0;
+        }
+
+        if( isClosed() ) {
+            throw IOException(
+                __FILE__, __LINE__, "Stream is Closed." );
+        }
+
+        // Perform smaller reads then the indicated amount
+        std::size_t remaining = Math::min( num, 2048 );
+        std::size_t skipped = 0;
+
+        std::vector<unsigned char> buffer( remaining );
+
+        while( skipped < num ) {
+
+            int result = this->inputStream->read( &buffer[0], remaining );
+
+            if( isClosed() ) {
+                throw IOException(
+                    __FILE__, __LINE__, "Stream is Closed." );
+            }
+
+            if( result == -1 ) {
+                return skipped;
+            }
+
+            this->sum->update( buffer, 0, remaining );
+
+            skipped += result;
+            remaining = ( num - skipped ) > buffer.size() ? buffer.size() : num - skipped;
+        }
+
+        return skipped;
+    }
+    DECAF_CATCH_RETHROW( IOException )
+    DECAF_CATCHALL_THROW( IOException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+int CheckedInputStream::doReadByte() throw ( decaf::io::IOException ) {
+
+    try{
+
+        if( isClosed() ) {
+            throw IOException(
+                __FILE__, __LINE__, "Stream is Closed." );
+        }
+
+        int result = this->inputStream->read();
+
+        if( result != -1 ) {
+            this->sum->update( result );
+        }
+
+        return result;
+    }
+    DECAF_CATCH_RETHROW( IOException )
+    DECAF_CATCHALL_THROW( IOException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+int CheckedInputStream::doReadArrayBounded( unsigned char* buffer, std::size_t size,
+                                            std::size_t offset, std::size_t length )
+    throw ( decaf::io::IOException,
+            decaf::lang::exceptions::IndexOutOfBoundsException,
+            decaf::lang::exceptions::NullPointerException ) {
+
+    try{
+
+        if( buffer == NULL ) {
+            throw NullPointerException(
+                __FILE__, __LINE__, "Buffer passed was NULL" );
+        }
+
+        if( ( offset + length ) > size ) {
+            throw IndexOutOfBoundsException(
+                __FILE__, __LINE__, "Offset + Length exceeds buffer size." );
+        }
+
+        if( length == 0 ) {
+            return 0;
+        }
+
+        if( isClosed() ) {
+            throw IOException(
+                __FILE__, __LINE__, "Stream is Closed." );
+        }
+
+        int result = this->inputStream->read( buffer, size, offset, length );
+
+        if( result != -1 ) {
+            // Only add the amount of bytes actually read to the Checksum.
+            this->sum->update( buffer, size, offset, result );
+        }
+
+        return result;
+    }
+    DECAF_CATCH_RETHROW( IOException )
+    DECAF_CATCH_RETHROW( IndexOutOfBoundsException )
+    DECAF_CATCH_RETHROW( NullPointerException )
+    DECAF_CATCHALL_THROW( IOException )
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.h?rev=915989&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.h
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.h
Wed Feb 24 21:56:17 2010
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _DECAF_UTIL_ZIP_CHECKEDINPUTSTREAM_H_
+#define _DECAF_UTIL_ZIP_CHECKEDINPUTSTREAM_H_
+
+#include <decaf/util/Config.h>
+#include <decaf/util/zip/Checksum.h>
+#include <decaf/io/FilterInputStream.h>
+
+namespace decaf {
+namespace util {
+namespace zip {
+
+    /**
+     * An implementation of a FilterInputStream that will maintain a Checksum of the
+     * bytes read, the Checksum can then be used to verify the integrity of the
+     * input stream.
+     *
+     * @since 1.0
+     */
+    class DECAF_API CheckedInputStream : public decaf::io::FilterInputStream {
+    private:
+
+        // Pointer to the Checksum instance to use in this stream, ownership
+        // of the Checksum pointer is not taken by this class.
+        Checksum* sum;
+
+    public:
+
+        /**
+         * Create a new instance of a CheckedInputStream
+         *
+         * @param inputStream
+         *      The InputStream instance to Wrap.
+         * @param sum
+         *      The Checksum instance to use (does not take ownership of the Pointer).
+         * @param own
+         *      Indicates if this filer should take ownership of the InputStream.
+         *
+         * @throws NullPointerException if the Checksum pointer is NULL.
+         */
+        CheckedInputStream( InputStream* inputStream, Checksum* sum, bool own = false );
+
+        virtual ~CheckedInputStream();
+
+        /**
+         * Returns a Pointer to the Checksum that is in use by this CheckedInputStream.
+         *
+         * @return the pointer to the Checksum instance that is in use by this object.
+         */
+        Checksum* getChecksum() const {
+            return this->sum;
+        }
+
+        /**
+         * {@inheritDoc}
+         *
+         * Adds the skipped bytes into the Checksum.
+         */
+        virtual std::size_t skip( std::size_t num ) throw( decaf::io::IOException );
+
+    protected:
+
+        virtual int doReadByte() throw ( decaf::io::IOException );
+
+        virtual int doReadArrayBounded( unsigned char* buffer, std::size_t size,
+                                        std::size_t offset, std::size_t length )
+            throw ( decaf::io::IOException,
+                    decaf::lang::exceptions::IndexOutOfBoundsException,
+                    decaf::lang::exceptions::NullPointerException );
+
+    };
+
+}}}
+
+#endif /* _DECAF_UTIL_ZIP_CHECKEDINPUTSTREAM_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedInputStream.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedOutputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedOutputStream.cpp?rev=915989&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedOutputStream.cpp
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedOutputStream.cpp
Wed Feb 24 21:56:17 2010
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "CheckedOutputStream.h"
+
+using namespace decaf;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::lang::exceptions;
+using namespace decaf::util;
+using namespace decaf::util::zip;
+
+////////////////////////////////////////////////////////////////////////////////
+CheckedOutputStream::CheckedOutputStream( OutputStream* outputStream, Checksum* sum, bool
own )
+ :  FilterOutputStream( outputStream, own ), sum( sum ) {
+
+    if( sum == NULL ) {
+        throw NullPointerException(
+            __FILE__, __LINE__, "The Checksum instance cannot be NULL." );
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+CheckedOutputStream::~CheckedOutputStream() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CheckedOutputStream::doWriteByte( unsigned char value ) throw ( decaf::io::IOException
) {
+
+    try{
+
+        if( isClosed() ) {
+            throw IOException(
+                 __FILE__, __LINE__, "Stream already closed" );
+        }
+
+        this->outputStream->write( value );
+        this->sum->update( value );
+    }
+    DECAF_CATCH_RETHROW( IOException )
+    DECAF_CATCHALL_THROW( IOException )
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CheckedOutputStream::doWriteArrayBounded( const unsigned char* buffer, std::size_t size,
+                                               std::size_t offset, std::size_t length )
+    throw ( decaf::io::IOException,
+            decaf::lang::exceptions::NullPointerException,
+            decaf::lang::exceptions::IndexOutOfBoundsException ) {
+
+    try{
+
+        if( buffer == NULL ) {
+            throw NullPointerException(
+                 __FILE__, __LINE__, "The buffer passed was NULL." );
+        }
+
+        if( offset + length > size ) {
+            throw IndexOutOfBoundsException(
+                __FILE__, __LINE__, "Given offset + length exceeds the buffer size." );
+        }
+
+        if( isClosed() ) {
+            throw IOException(
+                 __FILE__, __LINE__, "Stream already closed" );
+        }
+
+        this->outputStream->write( buffer, size, offset, length );
+        this->sum->update( buffer, size, offset, length );
+    }
+    DECAF_CATCH_RETHROW( IOException )
+    DECAF_CATCH_RETHROW( NullPointerException )
+    DECAF_CATCH_RETHROW( IndexOutOfBoundsException )
+    DECAF_CATCHALL_THROW( IOException )
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedOutputStream.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedOutputStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedOutputStream.h?rev=915989&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedOutputStream.h
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedOutputStream.h
Wed Feb 24 21:56:17 2010
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _DECAF_UTIL_ZIP_CHECKEDOUTPUTSTREAM_H_
+#define _DECAF_UTIL_ZIP_CHECKEDOUTPUTSTREAM_H_
+
+#include <decaf/util/Config.h>
+#include <decaf/util/zip/Checksum.h>
+#include <decaf/io/FilterOutputStream.h>
+
+namespace decaf {
+namespace util {
+namespace zip {
+
+    /**
+     * An implementation of a FilterOutputStream that will maintain a Checksum of the
+     * bytes written, the Checksum can then be used to verify the integrity of the
+     * output stream.
+     *
+     * @since 1.0
+     */
+    class DECAF_API CheckedOutputStream : public decaf::io::FilterOutputStream {
+    private:
+
+        // The Checksom instance used by this stream, not owned by the stream.
+        Checksum* sum;
+
+    public:
+
+        /**
+         * Create a new instance of a CheckedOutputStream
+         *
+         * @param outputStream
+         *      The OutputStream instance to Wrap.
+         * @param sum
+         *      The Checksum instance to use (does not take ownership of the Pointer).
+         * @param own
+         *      Indicates if this filer should take ownership of the InputStream.
+         *
+         * @throws NullPointerException if the Checksum pointer is NULL.
+         */
+        CheckedOutputStream( decaf::io::OutputStream* outputStream, Checksum* sum, bool own
= false );
+
+        virtual ~CheckedOutputStream();
+
+        /**
+         * @returns a pointer to the Checksum instance in use by this object.
+         */
+        Checksum* getChecksum() const {
+            return this->sum;
+        }
+
+    protected:
+
+        virtual void doWriteByte( unsigned char value ) throw ( decaf::io::IOException );
+
+        virtual void doWriteArrayBounded( const unsigned char* buffer, std::size_t size,
+                                          std::size_t offset, std::size_t length )
+            throw ( decaf::io::IOException,
+                    decaf::lang::exceptions::NullPointerException,
+                    decaf::lang::exceptions::IndexOutOfBoundsException );
+
+    };
+
+}}}
+
+#endif /* _DECAF_UTIL_ZIP_CHECKEDOUTPUTSTREAM_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/CheckedOutputStream.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp?rev=915989&r1=915988&r2=915989&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.cpp Wed Feb
24 21:56:17 2010
@@ -20,15 +20,7 @@
 #include <stdio.h>
 #include <assert.h>
 
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-
 #include <decaf/internal/util/zip/zlib.h>
-
 #include <decaf/lang/exceptions/RuntimeException.h>
 
 using namespace decaf;
@@ -416,7 +408,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-std::size_t Deflater::getAdler() const throw( decaf::lang::exceptions::IllegalStateException
) {
+long long Deflater::getAdler() const throw( decaf::lang::exceptions::IllegalStateException
) {
     if( this->data->stream == NULL ) {
         throw IllegalStateException(
             __FILE__, __LINE__, "The Deflator has already been ended." );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.h?rev=915989&r1=915988&r2=915989&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Deflater.h Wed Feb 24
21:56:17 2010
@@ -340,7 +340,7 @@
          *
          * @throws IllegalStateException if in the end state.
          */
-        std::size_t getAdler() const throw( decaf::lang::exceptions::IllegalStateException
);
+        long long getAdler() const throw( decaf::lang::exceptions::IllegalStateException
);
 
         /**
          * @returns the total number of uncompressed bytes input so far.

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp?rev=915989&r1=915988&r2=915989&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.cpp Wed Feb
24 21:56:17 2010
@@ -20,13 +20,6 @@
 #include <stdio.h>
 #include <assert.h>
 
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-
 #include <decaf/internal/util/zip/zlib.h>
 
 #include <decaf/lang/exceptions/RuntimeException.h>
@@ -395,7 +388,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-std::size_t Inflater::getAdler() const throw( decaf::lang::exceptions::IllegalStateException
) {
+long long Inflater::getAdler() const throw( decaf::lang::exceptions::IllegalStateException
) {
 
     if( this->data->stream == NULL ) {
         throw IllegalStateException(

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.h?rev=915989&r1=915988&r2=915989&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/zip/Inflater.h Wed Feb 24
21:56:17 2010
@@ -296,7 +296,7 @@
          *
          * @throws IllegalStateException if in the end state.
          */
-        std::size_t getAdler() const throw( decaf::lang::exceptions::IllegalStateException
);
+        long long getAdler() const throw( decaf::lang::exceptions::IllegalStateException
);
 
         /**
          * @returns the total number of compressed bytes input so far.

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am?rev=915989&r1=915988&r2=915989&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am Wed Feb 24 21:56:17 2010
@@ -141,6 +141,8 @@
     decaf/util/concurrent/locks/LockSupportTest.cpp \
     decaf/util/zip/Adler32Test.cpp \
     decaf/util/zip/CRC32Test.cpp \
+    decaf/util/zip/CheckedInputStreamTest.cpp \
+    decaf/util/zip/CheckedOutputStreamTest.cpp \
     decaf/util/zip/DeflaterTest.cpp \
     decaf/util/zip/InflaterTest.cpp \
     main.cpp \
@@ -282,6 +284,8 @@
     decaf/util/concurrent/locks/LockSupportTest.h \
     decaf/util/zip/Adler32Test.h \
     decaf/util/zip/CRC32Test.h \
+    decaf/util/zip/CheckedInputStreamTest.h \
+    decaf/util/zip/CheckedOutputStreamTest.h \
     decaf/util/zip/DeflaterTest.h \
     decaf/util/zip/InflaterTest.h \
     util/teamcity/TeamCityProgressListener.h

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.cpp?rev=915989&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.cpp
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.cpp
Wed Feb 24 21:56:17 2010
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "CheckedInputStreamTest.h"
+
+#include <decaf/util/zip/Deflater.h>
+#include <decaf/util/zip/CheckedOutputStream.h>
+#include <decaf/util/zip/CheckedInputStream.h>
+#include <decaf/util/zip/Adler32.h>
+#include <decaf/util/zip/CRC32.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+
+#include <vector>
+
+using namespace std;
+using namespace decaf;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::lang::exceptions;
+using namespace decaf::util;
+using namespace decaf::util::zip;
+
+////////////////////////////////////////////////////////////////////////////////
+CheckedInputStreamTest::CheckedInputStreamTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+CheckedInputStreamTest::~CheckedInputStreamTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CheckedInputStreamTest::testConstructor() {
+
+    std::vector<unsigned char> outPutBuf;
+    ByteArrayInputStream baos( outPutBuf );
+    CRC32 check;
+    CheckedInputStream chkIn( &baos, &check );
+    CPPUNIT_ASSERT_EQUAL_MESSAGE( "the checkSum value of the constructor is not 0",
+                                  0LL, chkIn.getChecksum()->getValue() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CheckedInputStreamTest::testGetChecksum() {
+
+    std::vector<unsigned char> emptyBuf;
+    ByteArrayInputStream baos( emptyBuf );
+    CRC32 check;
+    CheckedInputStream checkEmpty( &baos, &check );
+
+    while( checkEmpty.read() >= 0 ) {
+    }
+    CPPUNIT_ASSERT_EQUAL_MESSAGE( "the checkSum value of an empty file is not zero",
+                                  0LL, checkEmpty.getChecksum()->getValue() );
+
+    static const std::size_t SIZE = 10;
+    unsigned char byteArray[] = { 1, 3, 4, 7, 8, 'e', 'r', 't', 'y', '5' };
+
+    std::vector<unsigned char> outPutBuf( 500 );
+
+    Deflater deflater;
+    deflater.setInput( byteArray, SIZE, 0, SIZE );
+    deflater.finish();
+    while( !deflater.finished() ) {
+        deflater.deflate( outPutBuf );
+    }
+
+    ByteArrayInputStream bais( outPutBuf );
+    Adler32 adler;
+    CheckedInputStream checkIn( &bais, &adler );
+    while( checkIn.read() >= 0 ) {
+    }
+
+    CPPUNIT_ASSERT_MESSAGE( "the checksum value is incorrect",
+                            checkIn.getChecksum()->getValue() > 0 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CheckedInputStreamTest::testSkip() {
+
+    static const std::size_t SIZE = 256;
+    std::vector<unsigned char> byteArray( SIZE );
+    for( std::size_t i = 0; i < SIZE; ++i ) {
+        byteArray[i] = i;
+    }
+    std::vector<unsigned char> outPutBuf( 500 );
+
+    Deflater deflater;
+    deflater.setInput( &byteArray[0], SIZE, 0, SIZE );
+    deflater.finish();
+    while( !deflater.finished() ) {
+        deflater.deflate( outPutBuf );
+    }
+
+    ByteArrayInputStream bais( outPutBuf );
+    Adler32 adler;
+    CheckedInputStream checkIn( &bais, &adler );
+
+    std::size_t skipValue = 5;
+    CPPUNIT_ASSERT_EQUAL_MESSAGE( "the value returned by skip(n) is not the same as its parameter",
+                                  skipValue, checkIn.skip( skipValue ) );
+    checkIn.skip( skipValue );
+
+    CPPUNIT_ASSERT_MESSAGE( "checkSum value is not correct", checkIn.getChecksum()->getValue()
> 0 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CheckedInputStreamTest::testRead() {
+
+    static const std::size_t SIZE = 256;
+    std::vector<unsigned char> byteArray( SIZE );
+    for( std::size_t i = 0; i < SIZE; ++i ) {
+        byteArray[i] = i;
+    }
+    std::vector<unsigned char> outPutBuf( 500 );
+
+    Deflater deflater;
+    deflater.setInput( &byteArray[0], SIZE, 0, SIZE );
+    deflater.finish();
+    while( !deflater.finished() ) {
+        deflater.deflate( outPutBuf );
+    }
+
+    ByteArrayInputStream bais( outPutBuf );
+    Adler32 adler;
+    CheckedInputStream checkIn( &bais, &adler );
+
+    checkIn.read();
+    checkIn.close();
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should have thrown an IOException",
+        checkIn.read(),
+        IOException );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CheckedInputStreamTest::testReadBIII() {
+
+    static const std::size_t SIZE = 256;
+    std::vector<unsigned char> byteArray( SIZE );
+    for( std::size_t i = 0; i < SIZE; ++i ) {
+        byteArray[i] = i;
+    }
+    std::vector<unsigned char> outPutBuf( 500 );
+
+    Deflater deflater;
+    deflater.setInput( &byteArray[0], SIZE, 0, SIZE );
+    deflater.finish();
+    while( !deflater.finished() ) {
+        deflater.deflate( outPutBuf );
+    }
+
+    ByteArrayInputStream bais( outPutBuf );
+    Adler32 adler;
+    CheckedInputStream checkIn( &bais, &adler );
+
+    unsigned char buff[50];
+    checkIn.read( buff, 50, 10, 5 );
+    checkIn.close();
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should have thrown an IOException",
+        checkIn.read( buff, 50, 10, 5 ),
+        IOException );
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.h?rev=915989&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.h
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.h
Wed Feb 24 21:56:17 2010
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _DECAF_UTIL_ZIP_CHECKEDINPUTSTREAMTEST_H_
+#define _DECAF_UTIL_ZIP_CHECKEDINPUTSTREAMTEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace decaf {
+namespace util {
+namespace zip {
+
+    class CheckedInputStreamTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( CheckedInputStreamTest );
+        CPPUNIT_TEST( testConstructor );
+        CPPUNIT_TEST( testGetChecksum );
+        CPPUNIT_TEST( testSkip );
+        CPPUNIT_TEST( testRead );
+        CPPUNIT_TEST( testReadBIII );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        CheckedInputStreamTest();
+        virtual ~CheckedInputStreamTest();
+
+        void testConstructor();
+        void testGetChecksum();
+        void testSkip();
+        void testRead();
+        void testReadBIII();
+
+    };
+
+}}}
+
+#endif /* _DECAF_UTIL_ZIP_CHECKEDINPUTSTREAMTEST_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedInputStreamTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedOutputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedOutputStreamTest.cpp?rev=915989&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedOutputStreamTest.cpp
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedOutputStreamTest.cpp
Wed Feb 24 21:56:17 2010
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "CheckedOutputStreamTest.h"
+
+#include <decaf/util/zip/CheckedOutputStream.h>
+#include <decaf/util/zip/Adler32.h>
+#include <decaf/util/zip/CRC32.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+
+using namespace std;
+using namespace decaf;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::lang::exceptions;
+using namespace decaf::util;
+using namespace decaf::util::zip;
+
+////////////////////////////////////////////////////////////////////////////////
+CheckedOutputStreamTest::CheckedOutputStreamTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+CheckedOutputStreamTest::~CheckedOutputStreamTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CheckedOutputStreamTest::testConstructor() {
+
+    ByteArrayOutputStream baos;
+    CRC32 check;
+    CheckedOutputStream chkOut( &baos, &check );
+    CPPUNIT_ASSERT_EQUAL_MESSAGE( "the checkSum value of the constructor is not 0",
+                                  0LL, chkOut.getChecksum()->getValue() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CheckedOutputStreamTest::testGetChecksum() {
+
+    unsigned char byteArray[] = { 1, 2, 3, 'e', 'r', 't', 'g', 3, 6 };
+
+    ByteArrayOutputStream baos;
+    Adler32 check;
+    CheckedOutputStream chkOut( &baos, &check );
+
+    chkOut.write( byteArray[4] );
+    // ran JDK and found that checkSum value is 7536755
+
+    CPPUNIT_ASSERT_EQUAL_MESSAGE( "the checkSum value for writeI is incorrect",
+                                  7536755LL, chkOut.getChecksum()->getValue());
+
+    chkOut.getChecksum()->reset();
+    chkOut.write( byteArray, 9, 5, 4 );
+    // ran JDK and found that checkSum value is 51708133
+
+    CPPUNIT_ASSERT_EQUAL_MESSAGE( "the checkSum value for writeBII is incorrect ",
+                                  51708133LL, chkOut.getChecksum()->getValue() );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CheckedOutputStreamTest::testWriteI() {
+
+    static const int SIZE = 9;
+    unsigned char byteArray[] = { 1, 2, 3, 'e', 'r', 't', 'g', 3, 6 };
+
+    ByteArrayOutputStream baos;
+    CRC32 check;
+    CheckedOutputStream chkOut( &baos, &check );
+
+    for( int ix = 0; ix < SIZE; ++ix ) {
+        chkOut.write( byteArray[ix] );
+    }
+
+    CPPUNIT_ASSERT_MESSAGE(
+        "the checkSum value is zero, no bytes are written to the output file",
+        chkOut.getChecksum()->getValue() != 0 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void CheckedOutputStreamTest::testWriteBIII() {
+
+    static const int SIZE = 9;
+    unsigned char byteArray[] = { 1, 2, 3, 'e', 'r', 't', 'g', 3, 6 };
+
+    ByteArrayOutputStream baos;
+    CRC32 check;
+    CheckedOutputStream chkOut( &baos, &check );
+
+    chkOut.write( byteArray, SIZE, 4, 5 );
+    CPPUNIT_ASSERT_MESSAGE( "the checkSum value is zero, no bytes are written to the output
file",
+                            chkOut.getChecksum()->getValue() != 0 );
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should have thrown an IndexOutOfBoundsException",
+        chkOut.write( byteArray, SIZE, 4, 6 ),
+        IndexOutOfBoundsException );
+}

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedOutputStreamTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedOutputStreamTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedOutputStreamTest.h?rev=915989&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedOutputStreamTest.h
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedOutputStreamTest.h
Wed Feb 24 21:56:17 2010
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _DECAF_UTIL_ZIP_CHECKEDOUTPUTSTREAMTEST_H_
+#define _DECAF_UTIL_ZIP_CHECKEDOUTPUTSTREAMTEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace decaf {
+namespace util {
+namespace zip {
+
+    class CheckedOutputStreamTest : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( CheckedOutputStreamTest );
+        CPPUNIT_TEST( testConstructor );
+        CPPUNIT_TEST( testGetChecksum );
+        CPPUNIT_TEST( testWriteI );
+        CPPUNIT_TEST( testWriteBIII );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        CheckedOutputStreamTest();
+        virtual ~CheckedOutputStreamTest();
+
+        void testConstructor();
+        void testGetChecksum();
+        void testWriteI();
+        void testWriteBIII();
+
+    };
+
+}}}
+
+#endif /* _DECAF_UTIL_ZIP_CHECKEDOUTPUTSTREAMTEST_H_ */

Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/CheckedOutputStreamTest.h
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp?rev=915989&r1=915988&r2=915989&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/zip/InflaterTest.cpp Wed
Feb 24 21:56:17 2010
@@ -138,7 +138,7 @@
     // getting the checkSum value through the Adler32 class
     Adler32 adl;
     adl.update( dictionary, DICT_SIZE, 0, DICT_SIZE );
-    std::size_t checkSumR = adl.getValue();
+    long long checkSumR = adl.getValue();
 
     Inflater inflateDiction;
     inflateDiction.setInput( outPutBuf );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp?rev=915989&r1=915988&r2=915989&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp Wed Feb 24 21:56:17
2010
@@ -172,12 +172,12 @@
 //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::InputStreamTest );
 //#include <decaf/io/OutputStreamTest.h>
 //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::OutputStreamTest );
-//#include <decaf/io/FilterInputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterInputStreamTest );
+#include <decaf/io/FilterInputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterInputStreamTest );
 //#include <decaf/io/FilterOutputStreamTest.h>
 //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::FilterOutputStreamTest );
-//#include <decaf/io/BufferedInputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedInputStreamTest );
+#include <decaf/io/BufferedInputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedInputStreamTest );
 //#include <decaf/io/BufferedOutputStreamTest.h>
 //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::BufferedOutputStreamTest );
 //#include <decaf/io/ByteArrayInputStreamTest.h>
@@ -186,8 +186,8 @@
 //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::ByteArrayOutputStreamTest );
 #include <decaf/io/PushbackInputStreamTest.h>
 CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::PushbackInputStreamTest );
-//#include <decaf/io/DataInputStreamTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataInputStreamTest );
+#include <decaf/io/DataInputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataInputStreamTest );
 //#include <decaf/io/DataOutputStreamTest.h>
 //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataOutputStreamTest );
 //#include <decaf/io/WriterTest.h>
@@ -291,6 +291,10 @@
 //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::Adler32Test );
 //#include <decaf/util/zip/CRC32Test.h>
 //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CRC32Test );
+#include <decaf/util/zip/CheckedInputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedInputStreamTest );
+#include <decaf/util/zip/CheckedOutputStreamTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::zip::CheckedOutputStreamTest );
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
 // Marshaler Tests



Mime
View raw message