diff options
author | Stephen D. Huston <shuston@apache.org> | 2009-08-31 22:43:29 +0000 |
---|---|---|
committer | Stephen D. Huston <shuston@apache.org> | 2009-08-31 22:43:29 +0000 |
commit | 0ecf92a9a83e46ff31460183d57bceebc599418d (patch) | |
tree | edaa55153f4604e79bbd946abd5e47f1d5f76613 /qpid/cpp/src/tests/Variant.cpp | |
parent | 057d6d27d53a55ba19eaff8487727ab5d9df2768 (diff) | |
download | qpid-python-0ecf92a9a83e46ff31460183d57bceebc599418d.tar.gz |
Changes to make messaging API build on Windows: Prepend VAR_ to Variant types enum to avoid name clashes, add 'reference' type for FieldTable ValueMap to satisfy STL, refer to structs as such, not as class (avoids compile warning)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@809772 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/Variant.cpp')
-rw-r--r-- | qpid/cpp/src/tests/Variant.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/qpid/cpp/src/tests/Variant.cpp b/qpid/cpp/src/tests/Variant.cpp index 1bf2ed98ce..8ad659e59a 100644 --- a/qpid/cpp/src/tests/Variant.cpp +++ b/qpid/cpp/src/tests/Variant.cpp @@ -87,14 +87,14 @@ QPID_AUTO_TEST_CASE(testAssignment) { Variant value("abc"); Variant other = value; - BOOST_CHECK_EQUAL(STRING, value.getType()); + BOOST_CHECK_EQUAL(VAR_STRING, value.getType()); BOOST_CHECK_EQUAL(other.getType(), value.getType()); BOOST_CHECK_EQUAL(other.asString(), value.asString()); const uint32_t i(1000); value = i; - BOOST_CHECK_EQUAL(UINT32, value.getType()); - BOOST_CHECK_EQUAL(STRING, other.getType()); + BOOST_CHECK_EQUAL(VAR_UINT32, value.getType()); + BOOST_CHECK_EQUAL(VAR_STRING, other.getType()); } QPID_AUTO_TEST_CASE(testList) @@ -111,17 +111,17 @@ QPID_AUTO_TEST_CASE(testList) Variant::List::const_iterator i = value.asList().begin(); BOOST_CHECK(i != value.asList().end()); - BOOST_CHECK_EQUAL(STRING, i->getType()); + BOOST_CHECK_EQUAL(VAR_STRING, i->getType()); BOOST_CHECK_EQUAL(s, i->asString()); i++; BOOST_CHECK(i != value.asList().end()); - BOOST_CHECK_EQUAL(FLOAT, i->getType()); + BOOST_CHECK_EQUAL(VAR_FLOAT, i->getType()); BOOST_CHECK_EQUAL(f, i->asFloat()); i++; BOOST_CHECK(i != value.asList().end()); - BOOST_CHECK_EQUAL(INT16, i->getType()); + BOOST_CHECK_EQUAL(VAR_INT16, i->getType()); BOOST_CHECK_EQUAL(x, i->asInt16()); i++; @@ -140,17 +140,17 @@ QPID_AUTO_TEST_CASE(testMap) value.asMap()["my-key"] = x; BOOST_CHECK_EQUAL(3u, value.asMap().size()); - BOOST_CHECK_EQUAL(STRING, value.asMap()["colour"].getType()); + BOOST_CHECK_EQUAL(VAR_STRING, value.asMap()["colour"].getType()); BOOST_CHECK_EQUAL(red, value.asMap()["colour"].asString()); - BOOST_CHECK_EQUAL(FLOAT, value.asMap()["pi"].getType()); + BOOST_CHECK_EQUAL(VAR_FLOAT, value.asMap()["pi"].getType()); BOOST_CHECK_EQUAL(pi, value.asMap()["pi"].asFloat()); - BOOST_CHECK_EQUAL(INT16, value.asMap()["my-key"].getType()); + BOOST_CHECK_EQUAL(VAR_INT16, value.asMap()["my-key"].getType()); BOOST_CHECK_EQUAL(x, value.asMap()["my-key"].asInt16()); value.asMap()["my-key"] = "now it's a string"; - BOOST_CHECK_EQUAL(STRING, value.asMap()["my-key"].getType()); + BOOST_CHECK_EQUAL(VAR_STRING, value.asMap()["my-key"].getType()); BOOST_CHECK_EQUAL(std::string("now it's a string"), value.asMap()["my-key"].asString()); } |