activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r591825 [2/2] - in /activemq/activemq-cpp/decaf/trunk/src: main/decaf/io/ main/decaf/net/ test/ test/decaf/io/ test/decaf/lang/ test/decaf/net/
Date Sun, 04 Nov 2007 19:59:11 GMT
Modified: activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/FilterOutputStreamTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/FilterOutputStreamTest.cpp?rev=591825&r1=591824&r2=591825&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/FilterOutputStreamTest.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/decaf/io/FilterOutputStreamTest.cpp Sun Nov
 4 11:59:09 2007
@@ -43,7 +43,7 @@
     try {
         ByteArrayOutputStream baos;
         FilterOutputStream os( &baos );
-        os.write( (unsigned char*)&testString[0], 500 );
+        os.write( (unsigned char*)&testString[0], 0, 500 );
         os.flush();
         CPPUNIT_ASSERT_MESSAGE( "Bytes not written after flush",
                                 500 == baos.size() );
@@ -59,7 +59,7 @@
     try {
         ByteArrayOutputStream baos;
         FilterOutputStream os( &baos );
-        os.write( (unsigned char*)&testString[0], 500 );
+        os.write( (unsigned char*)&testString[0], 0, 500 );
         os.flush();
         CPPUNIT_ASSERT_MESSAGE( "Bytes not written after flush",
                                 500 == baos.size() );
@@ -75,13 +75,13 @@
     try {
         ByteArrayOutputStream baos;
         FilterOutputStream os( &baos );
-        os.write( (unsigned char*)&testString[0], testString.size() );
+        os.write( (unsigned char*)&testString[0], 0, testString.size() );
         ByteArrayInputStream bais( baos.toByteArray(), baos.size() );
         os.flush();
         CPPUNIT_ASSERT_MESSAGE( "Bytes not written after flush",
                                 bais.available() == testString.length() );
         unsigned char* wbytes = new unsigned char[ testString.length() ];
-        bais.read( wbytes, testString.length() );
+        bais.read( wbytes, 0, testString.length() );
         CPPUNIT_ASSERT_MESSAGE("Incorrect bytes written",
             testString == string( (const char*)wbytes, testString.length() ) );
 
@@ -102,7 +102,7 @@
         os.flush();
         CPPUNIT_ASSERT_MESSAGE( "Byte not written after flush", 1 == bais.available() );
         unsigned char wbytes[1];
-        bais.read( wbytes, 1 );
+        bais.read( wbytes, 0, 1 );
         CPPUNIT_ASSERT_MESSAGE("Incorrect byte written", 't' == wbytes[0] );
     } catch( IOException& e ) {
         CPPUNIT_FAIL("Write test failed : " + e.getMessage());

Modified: activemq/activemq-cpp/decaf/trunk/src/test/decaf/lang/MathTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/decaf/lang/MathTest.cpp?rev=591825&r1=591824&r2=591825&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/decaf/lang/MathTest.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/decaf/lang/MathTest.cpp Sun Nov  4 11:59:09
2007
@@ -274,9 +274,6 @@
     for( double d = 10; d >= -10; d -= 0.5 ) {
         double answer = Math::log( Math::exp(d) );
 
-        std::cout << "d: " << d << std::endl;
-        std::cout << "answer: " << answer << std::endl;
-
         CPPUNIT_ASSERT_MESSAGE(
                 "Answer does not equal expected answer for d",
                 Math::abs( answer - d ) <= Math::abs(d * 0.00000001) );

Modified: activemq/activemq-cpp/decaf/trunk/src/test/decaf/net/SocketFactoryTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/decaf/net/SocketFactoryTest.h?rev=591825&r1=591824&r2=591825&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/decaf/net/SocketFactoryTest.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/decaf/net/SocketFactoryTest.h Sun Nov  4 11:59:09
2007
@@ -97,7 +97,7 @@
                         io::InputStream* stream = socket->getInputStream();
                         memset( buf, 0, 1000 );
                         try{
-                            if( stream->read( buf, 1000 ) == -1 ) {
+                            if( stream->read( buf, 0, 1000 ) == -1 ) {
                                 done = true;
                                 continue;
                             }
@@ -106,7 +106,7 @@
 
                             if( strcmp( (char*)buf, "reply" ) == 0 ){
                                 io::OutputStream* output = socket->getOutputStream();
-                                output->write( (unsigned char*)"hello", strlen("hello"
) );
+                                output->write( (unsigned char*)"hello", 0, strlen("hello"
) );
                             }
 
                         }catch( io::IOException& ex ){

Modified: activemq/activemq-cpp/decaf/trunk/src/test/decaf/net/SocketTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/decaf/net/SocketTest.cpp?rev=591825&r1=591824&r2=591825&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/decaf/net/SocketTest.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/decaf/net/SocketTest.cpp Sun Nov  4 11:59:09
2007
@@ -98,7 +98,7 @@
         io::OutputStream* stream = client.getOutputStream();
 
         std::string msg = "don't reply";
-        stream->write( (unsigned char*)msg.c_str(), msg.length() );
+        stream->write( (unsigned char*)msg.c_str(), 0, msg.length() );
 
         Thread::sleep( 10 );
 
@@ -152,7 +152,7 @@
         io::OutputStream* stream = client.getOutputStream();
 
         std::string msg = "reply";
-        stream->write( (unsigned char*)msg.c_str(), msg.length() );
+        stream->write( (unsigned char*)msg.c_str(), 0, msg.length() );
 
         synchronized(&serverThread.mutex)
         {
@@ -162,7 +162,7 @@
         unsigned char buf[500];
         memset( buf, 0, 500 );
         io::InputStream* istream = client.getInputStream();
-        std::size_t numRead = istream->read( buf, 500 );
+        std::size_t numRead = istream->read( buf, 0, 500 );
         CPPUNIT_ASSERT( numRead == 5 );
         CPPUNIT_ASSERT( strcmp( (char*)buf, "hello" ) == 0 );
 
@@ -255,7 +255,7 @@
         io::OutputStream* stream = client.getOutputStream();
 
         std::string msg = "reply";
-        stream->write( (unsigned char*)msg.c_str(), msg.length() );
+        stream->write( (unsigned char*)msg.c_str(), 0, msg.length() );
 
         synchronized(&serverThread.mutex)
         {
@@ -265,7 +265,7 @@
         unsigned char buf[500];
         memset( buf, 0, 500 );
         io::InputStream* istream = client.getInputStream();
-        std::size_t numRead = istream->read( buf, 500 );
+        std::size_t numRead = istream->read( buf, 0, 500 );
         CPPUNIT_ASSERT( numRead == 5 );
         CPPUNIT_ASSERT( strcmp( (char*)buf, "hello" ) == 0 );
 

Modified: activemq/activemq-cpp/decaf/trunk/src/test/decaf/net/SocketTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/decaf/net/SocketTest.h?rev=591825&r1=591824&r2=591825&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/decaf/net/SocketTest.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/decaf/net/SocketTest.h Sun Nov  4 11:59:09
2007
@@ -105,7 +105,7 @@
                         memset( buf, 0, 1000 );
                         try{
 
-                            if( stream->read( buf, 1000 ) == -1 ) {
+                            if( stream->read( buf, 0, 1000 ) == -1 ) {
                                 done = true;
                                 continue;
                             }
@@ -114,7 +114,7 @@
 
                             if( strcmp( (char*)buf, "reply" ) == 0 ){
                                 io::OutputStream* output = socket->getOutputStream();
-                                output->write( (unsigned char*)"hello", strlen("hello"
) );
+                                output->write( (unsigned char*)"hello", 0, strlen("hello"
) );
 
                                   synchronized(&mutex)
                                   {

Modified: activemq/activemq-cpp/decaf/trunk/src/test/testRegistry.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/testRegistry.cpp?rev=591825&r1=591824&r2=591825&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/testRegistry.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/testRegistry.cpp Sun Nov  4 11:59:09 2007
@@ -35,58 +35,58 @@
 #include <decaf/io/DataOutputStreamTest.h>
 CPPUNIT_TEST_SUITE_REGISTRATION( decaf::io::DataOutputStreamTest );
 
-//#include <decaf/lang/MathTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::MathTest );
-//#include <decaf/lang/ByteTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ByteTest );
-//#include <decaf/lang/CharacterTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::CharacterTest );
-//#include <decaf/lang/BooleanTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::BooleanTest );
-//#include <decaf/lang/ShortTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ShortTest );
-//#include <decaf/lang/IntegerTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::IntegerTest );
-//#include <decaf/lang/LongTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::LongTest );
+#include <decaf/lang/MathTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::MathTest );
+#include <decaf/lang/ByteTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ByteTest );
+#include <decaf/lang/CharacterTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::CharacterTest );
+#include <decaf/lang/BooleanTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::BooleanTest );
+#include <decaf/lang/ShortTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ShortTest );
+#include <decaf/lang/IntegerTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::IntegerTest );
+#include <decaf/lang/LongTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::LongTest );
 //#include <decaf/lang/FloatTest.h>
 //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::FloatTest );
-//#include <decaf/lang/DoubleTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::DoubleTest );
-//#include <decaf/lang/ExceptionTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ExceptionTest );
-//#include <decaf/lang/ThreadTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ThreadTest );
-//#include <decaf/lang/SystemTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::SystemTest );
+#include <decaf/lang/DoubleTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::DoubleTest );
+#include <decaf/lang/ExceptionTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ExceptionTest );
+#include <decaf/lang/ThreadTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::ThreadTest );
+#include <decaf/lang/SystemTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::SystemTest );
 
-//#include <decaf/net/SocketFactoryTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketFactoryTest );
-//#include <decaf/net/SocketTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketTest );
-//#include <decaf/net/URITest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URITest );
-//#include <decaf/net/URISyntaxExceptionTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URISyntaxExceptionTest );
+#include <decaf/net/SocketFactoryTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketFactoryTest );
+#include <decaf/net/SocketTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketTest );
+#include <decaf/net/URITest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URITest );
+#include <decaf/net/URISyntaxExceptionTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URISyntaxExceptionTest );
 
-//#include <decaf/util/concurrent/CountDownLatchTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::CountDownLatchTest );
-//#include <decaf/util/concurrent/MutexTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::MutexTest );
-//#include <decaf/util/concurrent/ThreadPoolTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ThreadPoolTest );
+#include <decaf/util/concurrent/CountDownLatchTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::CountDownLatchTest );
+#include <decaf/util/concurrent/MutexTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::MutexTest );
+#include <decaf/util/concurrent/ThreadPoolTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::concurrent::ThreadPoolTest );
 
-//#include <decaf/util/DateTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::DateTest );
-//#include <decaf/util/UUIDTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::UUIDTest );
-//#include <decaf/util/MapTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::MapTest );
-//#include <decaf/util/QueueTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::QueueTest );
-//#include <decaf/util/RandomTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::RandomTest );
-//#include <decaf/util/SetTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::SetTest );
-//#include <decaf/util/StringTokenizerTest.h>
-//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StringTokenizerTest );
+#include <decaf/util/DateTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::DateTest );
+#include <decaf/util/UUIDTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::UUIDTest );
+#include <decaf/util/MapTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::MapTest );
+#include <decaf/util/QueueTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::QueueTest );
+#include <decaf/util/RandomTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::RandomTest );
+#include <decaf/util/SetTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::SetTest );
+#include <decaf/util/StringTokenizerTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StringTokenizerTest );



Mime
View raw message