From 037c28c0c658b44529783b79a6b895e3b89dc699 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Tue, 23 Oct 2007 12:41:16 +0000 Subject: More tidying up of field table API git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@587480 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/FieldValue.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cpp/src/tests/FieldValue.cpp') diff --git a/cpp/src/tests/FieldValue.cpp b/cpp/src/tests/FieldValue.cpp index f2a859c95e..311061b646 100644 --- a/cpp/src/tests/FieldValue.cpp +++ b/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() == true); + BOOST_CHECK(s.convertsTo() == false); + BOOST_CHECK(s.get() == "abc"); + BOOST_CHECK_THROW(s.get(), 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() == false); + BOOST_CHECK(i.convertsTo() == true); + BOOST_CHECK_THROW(i.get(), InvalidConversionException); + BOOST_CHECK(i.get() == 42); // BOOST_CHECK(i != ft); } -- cgit v1.2.1