summaryrefslogtreecommitdiff
path: root/cpp/src/tests/FieldTable.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-09-09 19:46:56 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-09-09 19:46:56 +0000
commitfbddf29b719cd610b01b2459c4827d636cda6c73 (patch)
tree4f1a87c509b151d428eca8c3c01c1bea0cd205a4 /cpp/src/tests/FieldTable.cpp
parentfd40457f6f471d10c3c804202d2329c93b2cb29e (diff)
downloadqpid-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/FieldTable.cpp')
-rw-r--r--cpp/src/tests/FieldTable.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/cpp/src/tests/FieldTable.cpp b/cpp/src/tests/FieldTable.cpp
index 5b43871f6d..fe2a14ec03 100644
--- a/cpp/src/tests/FieldTable.cpp
+++ b/cpp/src/tests/FieldTable.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
@@ -29,6 +29,9 @@
using namespace qpid::framing;
+namespace qpid {
+namespace tests {
+
QPID_AUTO_TEST_SUITE(FieldTableTestSuite)
QPID_AUTO_TEST_CASE(testMe)
@@ -57,7 +60,7 @@ QPID_AUTO_TEST_CASE(testAssignment)
a.setInt("B", 1234);
b = a;
a.setString("A", "CCCC");
-
+
BOOST_CHECK(string("CCCC") == a.getAsString("A"));
BOOST_CHECK(string("BBBB") == b.getAsString("A"));
BOOST_CHECK_EQUAL(1234, a.getAsInt("B"));
@@ -69,7 +72,7 @@ QPID_AUTO_TEST_CASE(testAssignment)
{
FieldTable c;
c = a;
-
+
char* buff = static_cast<char*>(::alloca(c.encodedSize()));
Buffer wbuffer(buff, c.encodedSize());
wbuffer.put(c);
@@ -102,7 +105,7 @@ QPID_AUTO_TEST_CASE(testNestedValues)
list.push_back(List::ValuePtr(new Unsigned32Value(u)));
list.push_back(List::ValuePtr(new Str8Value("yellow")));
list.push_back(List::ValuePtr(new DoubleValue(d)));
-
+
a.setString("id", "A");
b.setString("id", "B");
a.setTable("B", b);
@@ -192,7 +195,7 @@ QPID_AUTO_TEST_CASE(test64GetAndSetConverts)
FieldTable args;
args.setInt64("a",100);
args.setInt64("b",-(int64_t) ((int64_t) 1<<34));
-
+
args.setUInt64("c",1u);
args.setUInt64("d",(uint64_t) ((uint64_t) 1<<34));
BOOST_CHECK_EQUAL(1u, args.getAsUInt64("c"));
@@ -204,5 +207,7 @@ QPID_AUTO_TEST_CASE(test64GetAndSetConverts)
BOOST_CHECK_EQUAL((int64_t) ((int64_t) 1<<34), args.getAsInt64("d"));
}
-
+
QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests