Author: tabish
Date: Fri Jun 1 06:58:20 2007
New Revision: 543488
URL: http://svn.apache.org/viewvc?view=rev&rev=543488
Log:
http://issues.apache.org/activemq/browse/AMQCPP-103
Building Decaf lib
Added:
activemq/activemq-cpp/trunk/src/decaf/src/test/Makefile.am
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/BooleanTest.cpp
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/BooleanTest.h
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/IntegerTest.cpp
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/IntegerTest.h
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/LongTest.cpp
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/LongTest.h
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/util/StringTokenizerTest.cpp
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/util/StringTokenizerTest.h
activemq/activemq-cpp/trunk/src/decaf/src/test/main.cpp
Added: activemq/activemq-cpp/trunk/src/decaf/src/test/Makefile.am
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/test/Makefile.am?view=auto&rev=543488
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/test/Makefile.am (added)
+++ activemq/activemq-cpp/trunk/src/decaf/src/test/Makefile.am Fri Jun 1
06:58:20 2007
@@ -0,0 +1,37 @@
+# ---------------------------------------------------------------------------
+# 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.
+# ---------------------------------------------------------------------------
+
+cc_sources = \
+ decaf/lang/BooleanTest.cpp \
+ decaf/lang/IntegerTest.cpp \
+ decaf/lang/LongTest.cpp \
+ decaf/util/StringTokenizerTest.cpp \
+ main.cpp
+
+## Compile this as part of make check
+check_PROGRAMS = decaf-test
+## Also run the tests as part of make check
+TESTS = $(check_PROGRAMS)
+
+##
+## Compiler/Linker Options
+##
+CXXFLAGS = @CXXFLAGS@ -Wno-non-virtual-dtor -Wno-unused-parameter
-Wno-uninitialized
+decaf_test_SOURCES = $(cc_sources)
+decaf_test_CXXFLAGS = -I$(srcdir)/../main @CPPUNIT_CFLAGS@
+decaf_test_LDADD= ../main/libdecaf.a @CPPUNIT_LIBS@
+
Added: activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/BooleanTest.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/BooleanTest.cpp?view=auto&rev=543488
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/BooleanTest.cpp
(added)
+++ activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/BooleanTest.cpp
Fri Jun 1 06:58:20 2007
@@ -0,0 +1,44 @@
+/*
+ * 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 "BooleanTest.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::BooleanTest );
+
+using namespace std;
+using namespace decaf;
+using namespace decaf::lang;
+
+void BooleanTest::test(void)
+{
+ bool x = Boolean::parseBoolean("false");
+ bool y = Boolean::parseBoolean("true");
+ bool z = Boolean::parseBoolean("false");
+
+ CPPUNIT_ASSERT( x == false );
+ CPPUNIT_ASSERT( y == true );
+ CPPUNIT_ASSERT( z == false );
+
+ std::string x1 = Boolean::toString( x );
+ std::string y1 = Boolean::toString( y );
+ std::string z1 = Boolean::toString( z );
+
+ CPPUNIT_ASSERT( x1 == "false" );
+ CPPUNIT_ASSERT( y1 == "true" );
+ CPPUNIT_ASSERT( z1 == "false" );
+
+}
Added: activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/BooleanTest.h
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/BooleanTest.h?view=auto&rev=543488
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/BooleanTest.h
(added)
+++ activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/BooleanTest.h Fri
Jun 1 06:58:20 2007
@@ -0,0 +1,46 @@
+/*
+ * 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_LANG_BOOLEANTEST_H_
+#define _DECAF_LANG_BOOLEANTEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <decaf/lang/Boolean.h>
+
+namespace decaf{
+namespace lang{
+
+ class BooleanTest : public CppUnit::TestFixture
+ {
+ CPPUNIT_TEST_SUITE( BooleanTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ BooleanTest() {}
+ virtual ~BooleanTest() {}
+
+ virtual void test(void);
+
+ };
+
+}}
+
+#endif /*_DECAF_LANG_BOOLEANTEST_H_*/
Added: activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/IntegerTest.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/IntegerTest.cpp?view=auto&rev=543488
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/IntegerTest.cpp
(added)
+++ activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/IntegerTest.cpp
Fri Jun 1 06:58:20 2007
@@ -0,0 +1,44 @@
+/*
+ * 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 "IntegerTest.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::IntegerTest );
+
+using namespace std;
+using namespace decaf;
+using namespace decaf::lang;
+
+void IntegerTest::test(void)
+{
+ int x = Integer::parseInt("12");
+ int y = Integer::parseInt("12.1");
+ int z = Integer::parseInt("42 24");
+
+ CPPUNIT_ASSERT( x == 12 );
+ CPPUNIT_ASSERT( y == 12 );
+ CPPUNIT_ASSERT( z == 42 );
+
+ std::string x1 = Integer::toString( x );
+ std::string y1 = Integer::toString( y );
+ std::string z1 = Integer::toString( z );
+
+ CPPUNIT_ASSERT( x1 == "12" );
+ CPPUNIT_ASSERT( y1 == "12" );
+ CPPUNIT_ASSERT( z1 == "42" );
+
+}
Added: activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/IntegerTest.h
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/IntegerTest.h?view=auto&rev=543488
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/IntegerTest.h
(added)
+++ activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/IntegerTest.h Fri
Jun 1 06:58:20 2007
@@ -0,0 +1,46 @@
+/*
+ * 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_LANG_INTEGERTEST_H_
+#define _DECAF_LANG_INTEGERTEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <decaf/lang/Integer.h>
+
+namespace decaf{
+namespace lang{
+
+ class IntegerTest : public CppUnit::TestFixture
+ {
+ CPPUNIT_TEST_SUITE( IntegerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ IntegerTest(void) {}
+ virtual ~IntegerTest(void) {}
+
+ virtual void test(void);
+
+ };
+
+}}
+
+#endif /*_DECAF_LANG_INTEGERTEST_H_*/
Added: activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/LongTest.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/LongTest.cpp?view=auto&rev=543488
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/LongTest.cpp
(added)
+++ activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/LongTest.cpp Fri
Jun 1 06:58:20 2007
@@ -0,0 +1,44 @@
+/*
+ * 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 "LongTest.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::lang::LongTest );
+
+using namespace std;
+using namespace decaf;
+using namespace decaf::lang;
+
+void LongTest::test(void)
+{
+ long long x = Long::parseLong("12");
+ long long y = Long::parseLong("12.1");
+ long long z = Long::parseLong("42 24");
+
+ CPPUNIT_ASSERT( x == 12 );
+ CPPUNIT_ASSERT( y == 12 );
+ CPPUNIT_ASSERT( z == 42 );
+
+ std::string x1 = Long::toString( x );
+ std::string y1 = Long::toString( y );
+ std::string z1 = Long::toString( z );
+
+ CPPUNIT_ASSERT( x1 == "12" );
+ CPPUNIT_ASSERT( y1 == "12" );
+ CPPUNIT_ASSERT( z1 == "42" );
+
+}
Added: activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/LongTest.h
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/LongTest.h?view=auto&rev=543488
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/LongTest.h (added)
+++ activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/lang/LongTest.h Fri
Jun 1 06:58:20 2007
@@ -0,0 +1,46 @@
+/*
+ * 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_LANG_LONGTEST_H_
+#define _DECAF_LANG_LONGTEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <decaf/lang/Long.h>
+
+namespace decaf{
+namespace lang{
+
+ class LongTest : public CppUnit::TestFixture
+ {
+ CPPUNIT_TEST_SUITE( LongTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ LongTest() {}
+ virtual ~LongTest() {}
+
+ virtual void test(void);
+
+ };
+
+}}
+
+#endif /*_DECAF_LANG_LONGTEST_H_*/
Added:
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/util/StringTokenizerTest.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/util/StringTokenizerTest.cpp?view=auto&rev=543488
==============================================================================
---
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/util/StringTokenizerTest.cpp
(added)
+++
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/util/StringTokenizerTest.cpp
Fri Jun 1 06:58:20 2007
@@ -0,0 +1,100 @@
+/*
+ * 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 "StringTokenizerTest.h"
+
+CPPUNIT_TEST_SUITE_REGISTRATION( decaf::util::StringTokenizerTest );
+
+#include <decaf/util/StringTokenizer.h>
+
+using namespace std;
+using namespace decaf;
+using namespace decaf::util;
+
+////////////////////////////////////////////////////////////////////////////////
+void StringTokenizerTest::test()
+{
+ StringTokenizer tokenizer("stomp://127.0.0.1:23232", "://");
+ CPPUNIT_ASSERT( tokenizer.countTokens() == 3 );
+ CPPUNIT_ASSERT( tokenizer.nextToken() == "stomp" );
+ CPPUNIT_ASSERT( tokenizer.nextToken() == "127.0.0.1" );
+ CPPUNIT_ASSERT( tokenizer.nextToken() == "23232" );
+
+ StringTokenizer tokenizer1("::://stomp://127.0.0.1:23232:", ":/");
+ CPPUNIT_ASSERT( tokenizer1.countTokens() == 3 );
+ CPPUNIT_ASSERT( tokenizer1.nextToken() == "stomp" );
+ CPPUNIT_ASSERT( tokenizer1.nextToken() == "127.0.0.1" );
+ CPPUNIT_ASSERT( tokenizer1.nextToken() == "23232" );
+
+ StringTokenizer tokenizer2("test");
+ CPPUNIT_ASSERT( tokenizer2.countTokens() == 1 );
+ CPPUNIT_ASSERT( tokenizer2.hasMoreTokens() == true );
+ CPPUNIT_ASSERT( tokenizer2.nextToken() == "test" );
+ CPPUNIT_ASSERT( tokenizer2.hasMoreTokens() == false );
+
+ StringTokenizer tokenizer3(":", ":");
+ CPPUNIT_ASSERT( tokenizer3.countTokens() == 0 );
+ CPPUNIT_ASSERT( tokenizer3.hasMoreTokens() == false );
+ CPPUNIT_ASSERT( tokenizer3.nextToken(" ") == ":" );
+
+ try
+ {
+ tokenizer3.nextToken();
+ CPPUNIT_ASSERT( false );
+ }
+ catch(lang::exceptions::NoSuchElementException ex)
+ {
+ CPPUNIT_ASSERT( true );
+ }
+
+ StringTokenizer tokenizer4("the quick brown fox");
+ CPPUNIT_ASSERT( tokenizer4.countTokens() == 4 );
+ CPPUNIT_ASSERT( tokenizer4.hasMoreTokens() == true );
+ CPPUNIT_ASSERT( tokenizer4.nextToken() == "the" );
+ CPPUNIT_ASSERT( tokenizer4.nextToken() == "quick" );
+ CPPUNIT_ASSERT( tokenizer4.nextToken() == "brown" );
+ CPPUNIT_ASSERT( tokenizer4.nextToken() == "fox" );
+ CPPUNIT_ASSERT( tokenizer4.countTokens() == 0 );
+ CPPUNIT_ASSERT( tokenizer4.hasMoreTokens() == false );
+
+ StringTokenizer tokenizer5("the:quick:brown:fox", ":", true);
+ CPPUNIT_ASSERT( tokenizer5.countTokens() == 7 );
+ CPPUNIT_ASSERT( tokenizer5.hasMoreTokens() == true );
+ CPPUNIT_ASSERT( tokenizer5.nextToken() == "the" );
+ CPPUNIT_ASSERT( tokenizer5.nextToken() == ":" );
+ CPPUNIT_ASSERT( tokenizer5.nextToken() == "quick" );
+ CPPUNIT_ASSERT( tokenizer5.nextToken() == ":" );
+ CPPUNIT_ASSERT( tokenizer5.nextToken() == "brown" );
+ CPPUNIT_ASSERT( tokenizer5.nextToken() == ":" );
+ CPPUNIT_ASSERT( tokenizer5.nextToken() == "fox" );
+ CPPUNIT_ASSERT( tokenizer5.countTokens() == 0 );
+ CPPUNIT_ASSERT( tokenizer5.hasMoreTokens() == false );
+
+ std::vector<std::string> myArray;
+ StringTokenizer tokenizer6("the:quick:brown:fox", ":");
+ CPPUNIT_ASSERT( tokenizer6.countTokens() == 4 );
+ CPPUNIT_ASSERT( tokenizer6.toArray(myArray) == 4 );
+ CPPUNIT_ASSERT( tokenizer6.countTokens() == 0 );
+ tokenizer6.reset();
+ CPPUNIT_ASSERT( tokenizer6.countTokens() == 4 );
+ tokenizer6.reset("the:quick:brown:fox", "$");
+ CPPUNIT_ASSERT( tokenizer6.countTokens() == 1 );
+ tokenizer6.reset("this$is$a$test");
+ CPPUNIT_ASSERT( tokenizer6.countTokens() == 4 );
+ tokenizer6.reset("this$is$a$test", "$", true);
+ CPPUNIT_ASSERT( tokenizer6.countTokens() == 7 );
+}
Added:
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/util/StringTokenizerTest.h
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/util/StringTokenizerTest.h?view=auto&rev=543488
==============================================================================
---
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/util/StringTokenizerTest.h
(added)
+++
activemq/activemq-cpp/trunk/src/decaf/src/test/decaf/util/StringTokenizerTest.h
Fri Jun 1 06:58:20 2007
@@ -0,0 +1,43 @@
+/*
+ * 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_STRINGTOKENIZERTEST_H_
+#define _DECAF_UTIL_STRINGTOKENIZERTEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace decaf{
+namespace util{
+
+ class StringTokenizerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( StringTokenizerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ virtual ~StringTokenizerTest() {}
+
+ void test();
+
+ };
+
+}}
+
+#endif /*_DECAF_UTIL_STRINGTOKENIZERTEST_H_*/
Added: activemq/activemq-cpp/trunk/src/decaf/src/test/main.cpp
URL:
http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/decaf/src/test/main.cpp?view=auto&rev=543488
==============================================================================
--- activemq/activemq-cpp/trunk/src/decaf/src/test/main.cpp (added)
+++ activemq/activemq-cpp/trunk/src/decaf/src/test/main.cpp Fri Jun 1 06:58:20
2007
@@ -0,0 +1,36 @@
+/*
+ * 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 <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cppunit/BriefTestProgressListener.h>
+#include <cppunit/TestResult.h>
+#include <decaf/util/Config.h>
+
+int main( int argc DECAF_UNUSED, char **argv DECAF_UNUSED )
+{
+ CppUnit::TextUi::TestRunner runner;
+ CppUnit::TestFactoryRegistry ®istry =
CppUnit::TestFactoryRegistry::getRegistry();
+ runner.addTest( registry.makeTest() );
+
+ // Shows a message as each test starts
+ CppUnit::BriefTestProgressListener listener;
+ runner.eventManager().addListener( &listener );
+
+ bool wasSuccessful = runner.run( "", false );
+ return !wasSuccessful;
+}