summaryrefslogtreecommitdiff
path: root/src/mongo/base/data_view_test.cpp
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 00:22:50 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 10:56:02 -0400
commit9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch)
tree3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/base/data_view_test.cpp
parent01965cf52bce6976637ecb8f4a622aeb05ab256a (diff)
downloadmongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/base/data_view_test.cpp')
-rw-r--r--src/mongo/base/data_view_test.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/mongo/base/data_view_test.cpp b/src/mongo/base/data_view_test.cpp
index f7ecc82039e..aa0dfbb441f 100644
--- a/src/mongo/base/data_view_test.cpp
+++ b/src/mongo/base/data_view_test.cpp
@@ -36,42 +36,42 @@
namespace mongo {
- TEST(DataView, ConstDataView) {
- char buf[sizeof(uint32_t) * 3];
- uint32_t native = 1234;
- uint32_t le = endian::nativeToLittle(native);
- uint32_t be = endian::nativeToBig(native);
+TEST(DataView, ConstDataView) {
+ char buf[sizeof(uint32_t) * 3];
+ uint32_t native = 1234;
+ uint32_t le = endian::nativeToLittle(native);
+ uint32_t be = endian::nativeToBig(native);
- std::memcpy(buf, &native, sizeof(uint32_t));
- std::memcpy(buf + sizeof(uint32_t), &le, sizeof(uint32_t));
- std::memcpy(buf + sizeof(uint32_t) * 2, &be, sizeof(uint32_t));
+ std::memcpy(buf, &native, sizeof(uint32_t));
+ std::memcpy(buf + sizeof(uint32_t), &le, sizeof(uint32_t));
+ std::memcpy(buf + sizeof(uint32_t) * 2, &be, sizeof(uint32_t));
- ConstDataView cdv(buf);
+ ConstDataView cdv(buf);
- ASSERT_EQUALS(buf, cdv.view());
- ASSERT_EQUALS(buf + 5, cdv.view(5));
+ ASSERT_EQUALS(buf, cdv.view());
+ ASSERT_EQUALS(buf + 5, cdv.view(5));
- ASSERT_EQUALS(native, cdv.read<uint32_t>());
- ASSERT_EQUALS(native, cdv.read<LittleEndian<uint32_t>>(sizeof(uint32_t)));
- ASSERT_EQUALS(native, cdv.read<BigEndian<uint32_t>>(sizeof(uint32_t) * 2));
- }
+ ASSERT_EQUALS(native, cdv.read<uint32_t>());
+ ASSERT_EQUALS(native, cdv.read<LittleEndian<uint32_t>>(sizeof(uint32_t)));
+ ASSERT_EQUALS(native, cdv.read<BigEndian<uint32_t>>(sizeof(uint32_t) * 2));
+}
- TEST(DataView, DataView) {
- char buf[sizeof(uint32_t) * 3];
- uint32_t native = 1234;
+TEST(DataView, DataView) {
+ char buf[sizeof(uint32_t) * 3];
+ uint32_t native = 1234;
- DataView dv(buf);
+ DataView dv(buf);
- dv.write(native);
- dv.write(LittleEndian<uint32_t>(native), sizeof(uint32_t));
- dv.write(BigEndian<uint32_t>(native), sizeof(uint32_t) * 2);
+ dv.write(native);
+ dv.write(LittleEndian<uint32_t>(native), sizeof(uint32_t));
+ dv.write(BigEndian<uint32_t>(native), sizeof(uint32_t) * 2);
- ASSERT_EQUALS(buf, dv.view());
- ASSERT_EQUALS(buf + 5, dv.view(5));
+ ASSERT_EQUALS(buf, dv.view());
+ ASSERT_EQUALS(buf + 5, dv.view(5));
- ASSERT_EQUALS(native, dv.read<uint32_t>());
- ASSERT_EQUALS(native, dv.read<LittleEndian<uint32_t>>(sizeof(uint32_t)));
- ASSERT_EQUALS(native, dv.read<BigEndian<uint32_t>>(sizeof(uint32_t) * 2));
- }
+ ASSERT_EQUALS(native, dv.read<uint32_t>());
+ ASSERT_EQUALS(native, dv.read<LittleEndian<uint32_t>>(sizeof(uint32_t)));
+ ASSERT_EQUALS(native, dv.read<BigEndian<uint32_t>>(sizeof(uint32_t) * 2));
+}
-} // namespace mongo
+} // namespace mongo