Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / math / tests / paddedvector.cpp
index 26790e83f6ae36b923baac810c9f761099269ac3..14b1c3b7637d8a679f3127420f2c1ccd0d6f10f2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2018, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -64,25 +64,23 @@ namespace test
 {
 
 //! Typed test fixture
-template <typename T>
+template<typename T>
 class PaddedVectorTest : public ::testing::Test
 {
-    public:
+public:
 };
 
 //! The types used in testing
-using Implementations = ::testing::Types <
-        std::allocator<int32_t>,
-    std::allocator<float>,
-    std::allocator<double>,
-    std::allocator < BasicVector < float>>,
-    std::allocator < BasicVector < double>>,
-    AlignedAllocator<int32_t>,
-    AlignedAllocator<float>,
-    AlignedAllocator<double>,
-    AlignedAllocator < BasicVector < float>>,
-    AlignedAllocator < BasicVector<double>>
-                                   >;
+using Implementations = ::testing::Types<std::allocator<int32_t>,
+                                         std::allocator<float>,
+                                         std::allocator<double>,
+                                         std::allocator<BasicVector<float>>,
+                                         std::allocator<BasicVector<double>>,
+                                         AlignedAllocator<int32_t>,
+                                         AlignedAllocator<float>,
+                                         AlignedAllocator<double>,
+                                         AlignedAllocator<BasicVector<float>>,
+                                         AlignedAllocator<BasicVector<double>>>;
 TYPED_TEST_CASE(PaddedVectorTest, Implementations);
 
 TYPED_TEST(PaddedVectorTest, ConstructsResizesAndReserves)
@@ -116,8 +114,7 @@ TYPED_TEST(PaddedVectorTest, CanCopyAssign)
     fillInput(&w, 2);
 
     w = v;
-    compareViews(v.arrayRefWithPadding().unpaddedArrayRef(),
-                 w.arrayRefWithPadding().unpaddedArrayRef());
+    compareViews(v.arrayRefWithPadding().unpaddedArrayRef(), w.arrayRefWithPadding().unpaddedArrayRef());
     compareViews(makeArrayRef(v), makeArrayRef(v));
 }
 
@@ -131,16 +128,14 @@ TYPED_TEST(PaddedVectorTest, CanMoveAssign)
     fillInput(&x, 1);
 
     SCOPED_TRACE("Comparing padded views before move");
-    compareViews(v.arrayRefWithPadding().unpaddedArrayRef(),
-                 x.arrayRefWithPadding().unpaddedArrayRef());
+    compareViews(v.arrayRefWithPadding().unpaddedArrayRef(), x.arrayRefWithPadding().unpaddedArrayRef());
     SCOPED_TRACE("Comparing unpadded views before move");
     compareViews(makeArrayRef(v), makeArrayRef(x));
 
     w = std::move(x);
 
     SCOPED_TRACE("Comparing padded views");
-    compareViews(v.arrayRefWithPadding().unpaddedArrayRef(),
-                 w.arrayRefWithPadding().unpaddedArrayRef());
+    compareViews(v.arrayRefWithPadding().unpaddedArrayRef(), w.arrayRefWithPadding().unpaddedArrayRef());
     SCOPED_TRACE("Comparing unpadded views");
     compareViews(makeArrayRef(v), makeArrayRef(w));
 }
@@ -155,8 +150,7 @@ TYPED_TEST(PaddedVectorTest, CanSwap)
     fillInput(&x, 1);
 
     std::swap(w, x);
-    compareViews(v.arrayRefWithPadding().unpaddedArrayRef(),
-                 w.arrayRefWithPadding().unpaddedArrayRef());
+    compareViews(v.arrayRefWithPadding().unpaddedArrayRef(), w.arrayRefWithPadding().unpaddedArrayRef());
     compareViews(makeArrayRef(v), makeArrayRef(w));
 }