You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/05/04 17:13:47 UTC

svn commit: r771329 [2/2] - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/ main/activemq/util/ main/cms/ main/decaf/lang/ test/ test/activemq/util/

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/PrimitiveValueConverterTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/PrimitiveValueConverterTest.cpp?rev=771329&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/PrimitiveValueConverterTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/PrimitiveValueConverterTest.cpp Mon May  4 15:13:46 2009
@@ -0,0 +1,290 @@
+/**
+ * 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 "PrimitiveValueConverterTest.h"
+
+#include <activemq/util/PrimitiveValueConverter.h>
+#include <decaf/lang/exceptions/UnsupportedOperationException.h>
+
+using namespace activemq;
+using namespace activemq::util;
+using namespace decaf::lang::exceptions;
+
+////////////////////////////////////////////////////////////////////////////////
+void PrimitiveValueConverterTest::testConvertToBoolean() {
+
+    PrimitiveValueConverter converter;
+    PrimitiveValueNode input1( true );
+    PrimitiveValueNode input2( false );
+    PrimitiveValueNode input3( "true" );
+    PrimitiveValueNode input4( "a23" );
+    PrimitiveValueNode input5( 65536 );
+
+    bool result1 = converter.convert<bool>( input1 );
+    bool result2 = converter.convert<bool>( input2 );
+    bool result3 = converter.convert<bool>( input3 );
+    bool result4 = converter.convert<bool>( input4 );
+
+    CPPUNIT_ASSERT( result1 == true );
+    CPPUNIT_ASSERT( result2 == false );
+    CPPUNIT_ASSERT( result3 == true );
+    CPPUNIT_ASSERT( result4 == false );
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<bool>( input5 ),
+        UnsupportedOperationException );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PrimitiveValueConverterTest::testConvertToChar() {
+
+    PrimitiveValueConverter converter;
+    PrimitiveValueNode input1( (char)127 );
+    PrimitiveValueNode input2( (char)255 );
+    PrimitiveValueNode input3( 'a' );
+    PrimitiveValueNode input4( "a23" );
+    PrimitiveValueNode input5( 65536 );
+
+    char result1 = converter.convert<char>( input1 );
+    char result2 = converter.convert<char>( input2 );
+    char result3 = converter.convert<char>( input3 );
+
+    CPPUNIT_ASSERT( result1 == (char)127 );
+    CPPUNIT_ASSERT( result2 == (char)255 );
+    CPPUNIT_ASSERT( result3 == 'a' );
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<char>( input4 ),
+        UnsupportedOperationException );
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<char>( input5 ),
+        UnsupportedOperationException );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PrimitiveValueConverterTest::testConvertToByte() {
+
+    PrimitiveValueConverter converter;
+    PrimitiveValueNode input1( (unsigned char)127 );
+    PrimitiveValueNode input2( (unsigned char)255 );
+    PrimitiveValueNode input3( "4" );
+    PrimitiveValueNode input4( "4asd" );
+    PrimitiveValueNode input5( 65536 );
+
+    unsigned char result1 = converter.convert<unsigned char>( input1 );
+    unsigned char result2 = converter.convert<unsigned char>( input2 );
+    unsigned char result3 = converter.convert<unsigned char>( input3 );
+
+    CPPUNIT_ASSERT( result1 == (unsigned char)127 );
+    CPPUNIT_ASSERT( result2 == (unsigned char)255 );
+    CPPUNIT_ASSERT( result3 == (unsigned char)4 );
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<unsigned char>( input4 ),
+        UnsupportedOperationException );
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<unsigned char>( input5 ),
+        UnsupportedOperationException );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PrimitiveValueConverterTest::testConvertToShort() {
+
+    PrimitiveValueConverter converter;
+    PrimitiveValueNode input1( (unsigned char)127 );
+    PrimitiveValueNode input2( (short)65535 );
+    PrimitiveValueNode input3( "4" );
+    PrimitiveValueNode input4( 65537 );
+    PrimitiveValueNode input5( "4asd" );
+
+    short result1 = converter.convert<short>( input1 );
+    short result2 = converter.convert<short>( input2 );
+    short result3 = converter.convert<short>( input3 );
+
+    CPPUNIT_ASSERT( result1 == 127 );
+    CPPUNIT_ASSERT( result2 == (short)65535 );
+    CPPUNIT_ASSERT( result3 == 4 );
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<short>( input4 ),
+        UnsupportedOperationException );
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<short>( input5 ),
+        UnsupportedOperationException );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PrimitiveValueConverterTest::testConvertToInt() {
+
+    PrimitiveValueConverter converter;
+    PrimitiveValueNode input1( (unsigned char)127 );
+    PrimitiveValueNode input2( (short)65535 );
+    PrimitiveValueNode input3( (int)-1 );
+    PrimitiveValueNode input4( "4" );
+    PrimitiveValueNode input5( 45LL );
+    PrimitiveValueNode input6( "4asd" );
+
+    int result1 = converter.convert<int>( input1 );
+    int result2 = converter.convert<int>( input2 );
+    int result3 = converter.convert<int>( input3 );
+    int result4 = converter.convert<int>( input4 );
+
+    CPPUNIT_ASSERT( result1 == 127 );
+    CPPUNIT_ASSERT( result2 == (short)65535 );
+    CPPUNIT_ASSERT( result3 == -1 );
+    CPPUNIT_ASSERT( result4 == 4 );
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<int>( input5 ),
+        UnsupportedOperationException );
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<int>( input6 ),
+        UnsupportedOperationException );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PrimitiveValueConverterTest::testConvertToLong() {
+
+    PrimitiveValueConverter converter;
+    PrimitiveValueNode input1( (unsigned char)127 );
+    PrimitiveValueNode input2( (short)65535 );
+    PrimitiveValueNode input3( (int)-1 );
+    PrimitiveValueNode input4( "4" );
+    PrimitiveValueNode input5( 45LL );
+    PrimitiveValueNode input6( "4asd" );
+    PrimitiveValueNode input7( 12.6f );
+
+    long long result1 = converter.convert<long long>( input1 );
+    long long result2 = converter.convert<long long>( input2 );
+    long long result3 = converter.convert<long long>( input3 );
+    long long result4 = converter.convert<long long>( input4 );
+    long long result5 = converter.convert<long long>( input5 );
+
+    CPPUNIT_ASSERT( result1 == 127 );
+    CPPUNIT_ASSERT( result2 == (short)65535 );
+    CPPUNIT_ASSERT( result3 == -1 );
+    CPPUNIT_ASSERT( result4 == 4 );
+    CPPUNIT_ASSERT( result5 == 45LL );
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<long long>( input6 ),
+        UnsupportedOperationException );
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<long long>( input7 ),
+        UnsupportedOperationException );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PrimitiveValueConverterTest::testConvertToFloat() {
+
+    PrimitiveValueConverter converter;
+    PrimitiveValueNode input1( 12.1f );
+    PrimitiveValueNode input2( 135.0f );
+    PrimitiveValueNode input3( "4.0" );
+    PrimitiveValueNode input4( "4asd" );
+    PrimitiveValueNode input5( 65536 );
+
+    float result1 = converter.convert<float>( input1 );
+    float result2 = converter.convert<float>( input2 );
+    float result3 = converter.convert<float>( input3 );
+
+    CPPUNIT_ASSERT( result1 == 12.1f );
+    CPPUNIT_ASSERT( result2 == 135.0f );
+    CPPUNIT_ASSERT( result3 == 4.0 );
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<float>( input4 ),
+        UnsupportedOperationException );
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<float>( input5 ),
+        UnsupportedOperationException );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PrimitiveValueConverterTest::testConvertToDouble() {
+
+    PrimitiveValueConverter converter;
+    PrimitiveValueNode input1( 12.1 );
+    PrimitiveValueNode input2( 135.0 );
+    PrimitiveValueNode input3( "4.0" );
+    PrimitiveValueNode input4( "4asd" );
+    PrimitiveValueNode input5( 65536 );
+
+    double result1 = converter.convert<double>( input1 );
+    double result2 = converter.convert<double>( input2 );
+    double result3 = converter.convert<double>( input3 );
+
+    CPPUNIT_ASSERT( result1 == 12.1 );
+    CPPUNIT_ASSERT( result2 == (double)135.0 );
+    CPPUNIT_ASSERT( result3 == (double)4 );
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<double>( input4 ),
+        UnsupportedOperationException );
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<double>( input5 ),
+        UnsupportedOperationException );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void PrimitiveValueConverterTest::testConvertToString() {
+
+    PrimitiveValueConverter converter;
+    PrimitiveValueNode input1( (unsigned char)9 );
+    PrimitiveValueNode input2( 45LL );
+    PrimitiveValueNode input3( 135.0 );
+    PrimitiveValueNode input4( 135.01f );
+    PrimitiveValueNode input5( "4.0" );
+    PrimitiveValueNode input6( "4asd" );
+    PrimitiveValueNode input7( 65539 );
+
+    std::string result1 = converter.convert<std::string>( input1 );
+    std::string result2 = converter.convert<std::string>( input2 );
+    std::string result3 = converter.convert<std::string>( input3 );
+    std::string result4 = converter.convert<std::string>( input4 );
+    std::string result5 = converter.convert<std::string>( input5 );
+    std::string result6 = converter.convert<std::string>( input6 );
+    std::string result7 = converter.convert<std::string>( input7 );
+
+    CPPUNIT_ASSERT( result1 == "9" );
+    CPPUNIT_ASSERT( result2 == "45" );
+    CPPUNIT_ASSERT( result3 == "135" );
+    CPPUNIT_ASSERT( result4 == "135.01" );
+    CPPUNIT_ASSERT( result5 == "4.0" );
+    CPPUNIT_ASSERT( result6 == "4asd" );
+    CPPUNIT_ASSERT( result7 == "65539" );
+
+    CPPUNIT_ASSERT_THROW_MESSAGE(
+        "Should throw an UnsupportedOperationException",
+        converter.convert<unsigned int>( 24567 ),
+        UnsupportedOperationException );
+}

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

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/PrimitiveValueConverterTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/PrimitiveValueConverterTest.h?rev=771329&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/PrimitiveValueConverterTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/PrimitiveValueConverterTest.h Mon May  4 15:13:46 2009
@@ -0,0 +1,60 @@
+/**
+ * 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 _ACTIVEMQ_UTIL_PRIMITIVEVALUECONVERTERTEST_H_
+#define _ACTIVEMQ_UTIL_PRIMITIVEVALUECONVERTERTEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq {
+namespace util {
+
+    class PrimitiveValueConverterTest  : public CppUnit::TestFixture {
+
+        CPPUNIT_TEST_SUITE( PrimitiveValueConverterTest );
+        CPPUNIT_TEST( testConvertToBoolean );
+        CPPUNIT_TEST( testConvertToChar );
+        CPPUNIT_TEST( testConvertToByte );
+        CPPUNIT_TEST( testConvertToShort );
+        CPPUNIT_TEST( testConvertToInt );
+        CPPUNIT_TEST( testConvertToLong );
+        CPPUNIT_TEST( testConvertToFloat );
+        CPPUNIT_TEST( testConvertToDouble );
+        CPPUNIT_TEST( testConvertToString );
+        CPPUNIT_TEST_SUITE_END();
+
+    public:
+
+        PrimitiveValueConverterTest() {}
+        virtual ~PrimitiveValueConverterTest() {}
+
+        void testConvertToBoolean();
+        void testConvertToChar();
+        void testConvertToByte();
+        void testConvertToShort();
+        void testConvertToInt();
+        void testConvertToLong();
+        void testConvertToFloat();
+        void testConvertToDouble();
+        void testConvertToString();
+
+    };
+
+}}
+
+#endif /* _ACTIVEMQ_UTIL_PRIMITIVEVALUECONVERTERTEST_H_ */

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

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/PrimitiveValueNodeTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/PrimitiveValueNodeTest.cpp?rev=771329&r1=771328&r2=771329&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/PrimitiveValueNodeTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/util/PrimitiveValueNodeTest.cpp Mon May  4 15:13:46 2009
@@ -27,42 +27,42 @@
     PrimitiveValueNode node;
 
     node.setBool( true );
-    CPPUNIT_ASSERT( node.getValueType() == PrimitiveValueNode::BOOLEAN_TYPE );
+    CPPUNIT_ASSERT( node.getType() == PrimitiveValueNode::BOOLEAN_TYPE );
     CPPUNIT_ASSERT( node.getBool() == true );
     node.setBool( false );
-    CPPUNIT_ASSERT( node.getValueType() == PrimitiveValueNode::BOOLEAN_TYPE );
+    CPPUNIT_ASSERT( node.getType() == PrimitiveValueNode::BOOLEAN_TYPE );
     CPPUNIT_ASSERT( node.getBool() == false );
 
     node.setByte( 5 );
-    CPPUNIT_ASSERT( node.getValueType() == PrimitiveValueNode::BYTE_TYPE );
+    CPPUNIT_ASSERT( node.getType() == PrimitiveValueNode::BYTE_TYPE );
     CPPUNIT_ASSERT( node.getByte() == 5 );
 
     node.setChar( 'a' );
-    CPPUNIT_ASSERT( node.getValueType() == PrimitiveValueNode::CHAR_TYPE );
+    CPPUNIT_ASSERT( node.getType() == PrimitiveValueNode::CHAR_TYPE );
     CPPUNIT_ASSERT( node.getChar() == 'a' );
 
     node.setShort( 10 );
-    CPPUNIT_ASSERT( node.getValueType() == PrimitiveValueNode::SHORT_TYPE );
+    CPPUNIT_ASSERT( node.getType() == PrimitiveValueNode::SHORT_TYPE );
     CPPUNIT_ASSERT( node.getShort() == 10 );
 
     node.setInt( 10000 );
-    CPPUNIT_ASSERT( node.getValueType() == PrimitiveValueNode::INTEGER_TYPE );
+    CPPUNIT_ASSERT( node.getType() == PrimitiveValueNode::INTEGER_TYPE );
     CPPUNIT_ASSERT( node.getInt() == 10000 );
 
     node.setLong( 100000L );
-    CPPUNIT_ASSERT( node.getValueType() == PrimitiveValueNode::LONG_TYPE );
+    CPPUNIT_ASSERT( node.getType() == PrimitiveValueNode::LONG_TYPE );
     CPPUNIT_ASSERT( node.getLong() == 100000L );
 
     node.setDouble( 2.3 );
-    CPPUNIT_ASSERT( node.getValueType() == PrimitiveValueNode::DOUBLE_TYPE );
+    CPPUNIT_ASSERT( node.getType() == PrimitiveValueNode::DOUBLE_TYPE );
     CPPUNIT_ASSERT( node.getDouble() == 2.3 );
 
     node.setFloat( 3.2f );
-    CPPUNIT_ASSERT( node.getValueType() == PrimitiveValueNode::FLOAT_TYPE );
+    CPPUNIT_ASSERT( node.getType() == PrimitiveValueNode::FLOAT_TYPE );
     CPPUNIT_ASSERT( node.getFloat() == 3.2f );
 
     node.setString( "hello" );
-    CPPUNIT_ASSERT( node.getValueType() == PrimitiveValueNode::STRING_TYPE );
+    CPPUNIT_ASSERT( node.getType() == PrimitiveValueNode::STRING_TYPE );
     CPPUNIT_ASSERT( node.getString() == "hello" );
 
     std::vector<unsigned char> byteArray;
@@ -72,7 +72,7 @@
     byteArray.push_back( 'd' );
 
     node.setByteArray( byteArray );
-    CPPUNIT_ASSERT( node.getValueType() == PrimitiveValueNode::BYTE_ARRAY_TYPE );
+    CPPUNIT_ASSERT( node.getType() == PrimitiveValueNode::BYTE_ARRAY_TYPE );
     CPPUNIT_ASSERT( node.getByteArray() == byteArray );
 
     try{
@@ -82,7 +82,7 @@
     }
 
     node.clear();
-    CPPUNIT_ASSERT( node.getValueType() == PrimitiveValueNode::NULL_TYPE );
+    CPPUNIT_ASSERT( node.getType() == PrimitiveValueNode::NULL_TYPE );
 }
 
 void PrimitiveValueNodeTest::testValueNodeCtors(){
@@ -99,22 +99,22 @@
     PrimitiveValueNode bArrayValue = std::vector<unsigned char>();
 
     CPPUNIT_ASSERT( tfvalue.getBool() == true );
-    CPPUNIT_ASSERT( tfvalue.getValueType() == PrimitiveValueNode::BOOLEAN_TYPE );
+    CPPUNIT_ASSERT( tfvalue.getType() == PrimitiveValueNode::BOOLEAN_TYPE );
     CPPUNIT_ASSERT( bvalue.getByte() == 60 );
-    CPPUNIT_ASSERT( bvalue.getValueType() == PrimitiveValueNode::BYTE_TYPE );
+    CPPUNIT_ASSERT( bvalue.getType() == PrimitiveValueNode::BYTE_TYPE );
     CPPUNIT_ASSERT( cvalue.getChar() == (char)60 );
-    CPPUNIT_ASSERT( cvalue.getValueType() == PrimitiveValueNode::CHAR_TYPE );
+    CPPUNIT_ASSERT( cvalue.getType() == PrimitiveValueNode::CHAR_TYPE );
     CPPUNIT_ASSERT( svalue.getShort() == 32767 );
-    CPPUNIT_ASSERT( svalue.getValueType() == PrimitiveValueNode::SHORT_TYPE );
+    CPPUNIT_ASSERT( svalue.getType() == PrimitiveValueNode::SHORT_TYPE );
     CPPUNIT_ASSERT( ivalue.getInt() == 4096 );
-    CPPUNIT_ASSERT( ivalue.getValueType() == PrimitiveValueNode::INTEGER_TYPE );
+    CPPUNIT_ASSERT( ivalue.getType() == PrimitiveValueNode::INTEGER_TYPE );
     CPPUNIT_ASSERT( lvalue.getLong() == 555666777888LL );
-    CPPUNIT_ASSERT( lvalue.getValueType() == PrimitiveValueNode::LONG_TYPE );
+    CPPUNIT_ASSERT( lvalue.getType() == PrimitiveValueNode::LONG_TYPE );
     CPPUNIT_ASSERT( fvalue.getFloat() == 0.125f );
-    CPPUNIT_ASSERT( fvalue.getValueType() == PrimitiveValueNode::FLOAT_TYPE );
+    CPPUNIT_ASSERT( fvalue.getType() == PrimitiveValueNode::FLOAT_TYPE );
     CPPUNIT_ASSERT( dvalue.getDouble() == 10.056 );
-    CPPUNIT_ASSERT( dvalue.getValueType() == PrimitiveValueNode::DOUBLE_TYPE );
+    CPPUNIT_ASSERT( dvalue.getType() == PrimitiveValueNode::DOUBLE_TYPE );
     CPPUNIT_ASSERT( strValue.getString() == "TEST" );
-    CPPUNIT_ASSERT( strValue.getValueType() == PrimitiveValueNode::STRING_TYPE );
-    CPPUNIT_ASSERT( bArrayValue.getValueType() == PrimitiveValueNode::BYTE_ARRAY_TYPE );
+    CPPUNIT_ASSERT( strValue.getType() == PrimitiveValueNode::STRING_TYPE );
+    CPPUNIT_ASSERT( bArrayValue.getType() == PrimitiveValueNode::BYTE_ARRAY_TYPE );
 }

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=771329&r1=771328&r2=771329&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/testRegistry.cpp Mon May  4 15:13:46 2009
@@ -116,6 +116,8 @@
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveListTest );
 #include <activemq/util/PrimitiveMapTest.h>
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveMapTest );
+#include <activemq/util/PrimitiveValueConverterTest.h>
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::PrimitiveValueConverterTest );
 #include <activemq/util/URISupportTest.h>
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::util::URISupportTest );
 #include <activemq/util/MemoryUsageTest.h>