diff options
author | Andrew Stitcher <astitcher@apache.org> | 2009-09-09 19:46:56 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2009-09-09 19:46:56 +0000 |
commit | fbddf29b719cd610b01b2459c4827d636cda6c73 (patch) | |
tree | 4f1a87c509b151d428eca8c3c01c1bea0cd205a4 /cpp/src/tests/Variant.cpp | |
parent | fd40457f6f471d10c3c804202d2329c93b2cb29e (diff) | |
download | qpid-python-fbddf29b719cd610b01b2459c4827d636cda6c73.tar.gz |
Tidied up namespace usage
Miscelleneous whitespace fixes
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@813094 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/Variant.cpp')
-rw-r--r-- | cpp/src/tests/Variant.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/cpp/src/tests/Variant.cpp b/cpp/src/tests/Variant.cpp index b7ce776827..2d68bb842c 100644 --- a/cpp/src/tests/Variant.cpp +++ b/cpp/src/tests/Variant.cpp @@ -7,9 +7,9 @@ * 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 @@ -25,6 +25,9 @@ using namespace qpid::messaging; +namespace qpid { +namespace tests { + QPID_AUTO_TEST_SUITE(VariantSuite) QPID_AUTO_TEST_CASE(testConversions) @@ -94,11 +97,11 @@ QPID_AUTO_TEST_CASE(testAssignment) const uint32_t i(1000); value = i; BOOST_CHECK_EQUAL(VAR_UINT32, value.getType()); - BOOST_CHECK_EQUAL(VAR_STRING, other.getType()); + BOOST_CHECK_EQUAL(VAR_STRING, other.getType()); } QPID_AUTO_TEST_CASE(testList) -{ +{ const std::string s("abc"); const float f(9.876f); const int16_t x(1000); @@ -108,7 +111,7 @@ QPID_AUTO_TEST_CASE(testList) value.asList().push_back(Variant(f)); value.asList().push_back(Variant(x)); BOOST_CHECK_EQUAL(3u, value.asList().size()); - Variant::List::const_iterator i = value.asList().begin(); + Variant::List::const_iterator i = value.asList().begin(); BOOST_CHECK(i != value.asList().end()); BOOST_CHECK_EQUAL(VAR_STRING, i->getType()); @@ -129,7 +132,7 @@ QPID_AUTO_TEST_CASE(testList) } QPID_AUTO_TEST_CASE(testMap) -{ +{ const std::string red("red"); const float pi(3.14f); const int16_t x(1000); @@ -145,7 +148,7 @@ QPID_AUTO_TEST_CASE(testMap) BOOST_CHECK_EQUAL(VAR_FLOAT, value.asMap()["pi"].getType()); BOOST_CHECK_EQUAL(pi, value.asMap()["pi"].asFloat()); - + BOOST_CHECK_EQUAL(VAR_INT16, value.asMap()["my-key"].getType()); BOOST_CHECK_EQUAL(x, value.asMap()["my-key"].asInt16()); @@ -153,5 +156,7 @@ QPID_AUTO_TEST_CASE(testMap) 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()); } - + QPID_AUTO_TEST_SUITE_END() + +}} // namespace qpid::tests |