/*
* 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.
{
//! 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)
fillInput(&w, 2);
w = v;
- compareViews(v.arrayRefWithPadding().unpaddedArrayRef(),
- w.arrayRefWithPadding().unpaddedArrayRef());
+ compareViews(v.arrayRefWithPadding().unpaddedArrayRef(), w.arrayRefWithPadding().unpaddedArrayRef());
compareViews(makeArrayRef(v), makeArrayRef(v));
}
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));
}
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));
}