diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2007-10-23 12:41:16 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2007-10-23 12:41:16 +0000 |
| commit | 8f1789d342b48cf4e037c2daf2a01869819950e4 (patch) | |
| tree | 382d33b4ea663f00248867dbd1efa00daa24054c /qpid/cpp/src/tests | |
| parent | 2e1c153c70e7056216903ce30db3acb225b1c5b8 (diff) | |
| download | qpid-python-8f1789d342b48cf4e037c2daf2a01869819950e4.tar.gz | |
More tidying up of field table API
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@587480 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
| -rw-r--r-- | qpid/cpp/src/tests/FieldValue.cpp | 9 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/Makefile.am | 27 |
2 files changed, 22 insertions, 14 deletions
diff --git a/qpid/cpp/src/tests/FieldValue.cpp b/qpid/cpp/src/tests/FieldValue.cpp index f2a859c95e..311061b646 100644 --- a/qpid/cpp/src/tests/FieldValue.cpp +++ b/qpid/cpp/src/tests/FieldValue.cpp @@ -35,7 +35,12 @@ BOOST_AUTO_TEST_CASE(testStringValueEquals) BOOST_CHECK(StringValue("abc") == s); BOOST_CHECK(StringValue("foo") != s); BOOST_CHECK(s != i); + BOOST_CHECK(s.convertsTo<std::string>() == true); + BOOST_CHECK(s.convertsTo<int>() == false); + BOOST_CHECK(s.get<std::string>() == "abc"); + BOOST_CHECK_THROW(s.get<int>(), InvalidConversionException); // BOOST_CHECK(s != ft); + } BOOST_AUTO_TEST_CASE(testIntegerValueEquals) @@ -43,6 +48,10 @@ BOOST_AUTO_TEST_CASE(testIntegerValueEquals) BOOST_CHECK(IntegerValue(42) == i); BOOST_CHECK(IntegerValue(5) != i); BOOST_CHECK(i != s); + BOOST_CHECK(i.convertsTo<std::string>() == false); + BOOST_CHECK(i.convertsTo<int>() == true); + BOOST_CHECK_THROW(i.get<std::string>(), InvalidConversionException); + BOOST_CHECK(i.get<int>() == 42); // BOOST_CHECK(i != ft); } diff --git a/qpid/cpp/src/tests/Makefile.am b/qpid/cpp/src/tests/Makefile.am index b484bc19c7..233614367d 100644 --- a/qpid/cpp/src/tests/Makefile.am +++ b/qpid/cpp/src/tests/Makefile.am @@ -113,7 +113,7 @@ broker_unit_tests = \ ClientSessionTest #client_unit_tests = \ - ClientChannelTest +# ClientChannelTest framing_unit_tests = \ FramingTest \ @@ -139,8 +139,7 @@ testprogs= \ topic_publisher # echo_service -#check_PROGRAMS += $(testprogs) interop_runner -check_PROGRAMS += $(testprogs) +check_PROGRAMS += $(testprogs) interop_runner TESTS_ENVIRONMENT = VALGRIND=$(VALGRIND) srcdir=$(srcdir) $(srcdir)/run_test @@ -201,14 +200,14 @@ all-am: .valgrind.supp .valgrindrc CLEANFILES+=valgrind.out *.log *.vglog .valgrindrc .valgrind.supp dummy_test $(unit_wrappers) MAINTAINERCLEANFILES=gen.mk -#interop_runner_SOURCES = \ -# interop_runner.cpp \ -# SimpleTestCaseBase.cpp \ -# BasicP2PTest.cpp \ -# BasicPubSubTest.cpp \ -# SimpleTestCaseBase.h \ -# BasicP2PTest.h \ -# BasicPubSubTest.h \ -# TestCase.h \ -# TestOptions.h -#interop_runner_LDADD = $(lib_client) $(lib_common) $(extra_libs) +interop_runner_SOURCES = \ + interop_runner.cpp \ + SimpleTestCaseBase.cpp \ + BasicP2PTest.cpp \ + BasicPubSubTest.cpp \ + SimpleTestCaseBase.h \ + BasicP2PTest.h \ + BasicPubSubTest.h \ + TestCase.h \ + TestOptions.h +interop_runner_LDADD = $(lib_client) $(lib_common) $(extra_libs) |
