From db888daddbc4f6f9e0f8f0b3d46165c1d6fe450e Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Fri, 20 Oct 2023 13:26:52 +0200 Subject: [PATCH] tests: remove deprecated header --- tests/test_perm_all.cpp | 98 +++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 52 deletions(-) diff --git a/tests/test_perm_all.cpp b/tests/test_perm_all.cpp index 7a54889c..553d6c91 100644 --- a/tests/test_perm_all.cpp +++ b/tests/test_perm_all.cpp @@ -20,7 +20,6 @@ #include #include -#include #include //____________________________________________________________________________// @@ -44,10 +43,9 @@ struct Fixture : public IsPermFunctions { using PermType = _PermType; Fixture() - : zero({0}), V01({0, 1}), V10({1, 0}), V11({1, 1}), - V1({}, 1), PPa({1, 2, 3, 4, 0, 5}), - PPb({1, 2, 3, 6, 0, 5}), czero(zero), cV01(V01), - RandPerm({3, 1, 0, 5, 10, 2, 6, 7, 4, 8, 9}), + : zero({0}), V01({0, 1}), V10({1, 0}), V11({1, 1}), V1({}, 1), + PPa({1, 2, 3, 4, 0, 5}), PPb({1, 2, 3, 6, 0, 5}), czero(zero), + cV01(V01), RandPerm({3, 1, 0, 5, 10, 2, 6, 7, 4, 8, 9}), Plist({PPa, PPb, RandPerm}), Vlist({zero, V01, V10, V11, V1, PPa, PPb, RandPerm}) { BOOST_TEST_MESSAGE("setup fixture"); @@ -70,12 +68,9 @@ struct Fixture : public IsPermFunctions { //____________________________________________________________________________// typedef boost::mpl::list< - Fixture, - Fixture>, - Fixture>, - Fixture>, - Fixture>, - Fixture>, + Fixture, Fixture>, + Fixture>, Fixture>, + Fixture>, Fixture>, Fixture>> Fixtures; @@ -85,7 +80,7 @@ BOOST_AUTO_TEST_SUITE(VectType_test) //____________________________________________________________________________// BOOST_FIXTURE_TEST_CASE_TEMPLATE(sizeof_test, F, Fixtures, F) { - BOOST_TEST(sizeof(F::zero) == F::VectType::Size()*sizeof(F::zero[0])); + BOOST_TEST(sizeof(F::zero) == F::VectType::Size() * sizeof(F::zero[0])); } BOOST_FIXTURE_TEST_CASE_TEMPLATE(equal_test, F, Fixtures, F) { @@ -163,47 +158,46 @@ BOOST_FIXTURE_TEST_CASE_TEMPLATE(operator_less_partial_test, F, Fixtures, F) { BOOST_TEST(F::PPb.less_partial(F::PPa, 5) > 0); } - BOOST_FIXTURE_TEST_CASE_TEMPLATE(first_zero_test, F, Fixtures, F) { - BOOST_TEST(F::zero.first_zero() == 0u); - BOOST_TEST(F::V01.first_zero() == 0u); - BOOST_TEST(F::PPa.first_zero() == 4u); - BOOST_TEST(F::V10.first_zero() == 1u); - BOOST_TEST(F::V1.first_zero() == F::VectType::Size()); - BOOST_TEST(F::V10.first_zero(1) == F::VectType::Size()); - BOOST_TEST(F::PPa.first_zero(5) == 4u); - BOOST_TEST(F::PPa.first_zero(3) == F::VectType::Size()); + BOOST_TEST(F::zero.first_zero() == 0u); + BOOST_TEST(F::V01.first_zero() == 0u); + BOOST_TEST(F::PPa.first_zero() == 4u); + BOOST_TEST(F::V10.first_zero() == 1u); + BOOST_TEST(F::V1.first_zero() == F::VectType::Size()); + BOOST_TEST(F::V10.first_zero(1) == F::VectType::Size()); + BOOST_TEST(F::PPa.first_zero(5) == 4u); + BOOST_TEST(F::PPa.first_zero(3) == F::VectType::Size()); } BOOST_FIXTURE_TEST_CASE_TEMPLATE(last_zero_test, F, Fixtures, F) { - BOOST_TEST(F::zero.last_zero() == F::VectType::Size() - 1); - BOOST_TEST(F::V01.last_zero() == F::VectType::Size() - 1); - BOOST_TEST(F::PPa.last_zero() == 4u); - BOOST_TEST(F::V1.last_zero() == F::VectType::Size()); - BOOST_TEST(F::V01.last_zero(1) == 0u); - BOOST_TEST(F::V10.last_zero(1) == F::VectType::Size()); - BOOST_TEST(F::PPa.last_zero(5) == 4u); - BOOST_TEST(F::PPa.last_zero(3) == F::VectType::Size()); + BOOST_TEST(F::zero.last_zero() == F::VectType::Size() - 1); + BOOST_TEST(F::V01.last_zero() == F::VectType::Size() - 1); + BOOST_TEST(F::PPa.last_zero() == 4u); + BOOST_TEST(F::V1.last_zero() == F::VectType::Size()); + BOOST_TEST(F::V01.last_zero(1) == 0u); + BOOST_TEST(F::V10.last_zero(1) == F::VectType::Size()); + BOOST_TEST(F::PPa.last_zero(5) == 4u); + BOOST_TEST(F::PPa.last_zero(3) == F::VectType::Size()); } BOOST_FIXTURE_TEST_CASE_TEMPLATE(first_non_zero_test, F, Fixtures, F) { - BOOST_TEST(F::zero.first_non_zero() == F::VectType::Size()); - BOOST_TEST(F::V01.first_non_zero() == 1u); - BOOST_TEST(F::PPa.first_non_zero() == 0u); - BOOST_TEST(F::V01.first_non_zero() == 1u); - BOOST_TEST(F::V01.first_non_zero(1) == F::VectType::Size()); - BOOST_TEST(F::PPa.first_non_zero(5) == 0u); - BOOST_TEST(F::PPa.first_non_zero(3) == 0u); + BOOST_TEST(F::zero.first_non_zero() == F::VectType::Size()); + BOOST_TEST(F::V01.first_non_zero() == 1u); + BOOST_TEST(F::PPa.first_non_zero() == 0u); + BOOST_TEST(F::V01.first_non_zero() == 1u); + BOOST_TEST(F::V01.first_non_zero(1) == F::VectType::Size()); + BOOST_TEST(F::PPa.first_non_zero(5) == 0u); + BOOST_TEST(F::PPa.first_non_zero(3) == 0u); } BOOST_FIXTURE_TEST_CASE_TEMPLATE(last_non_zero_test, F, Fixtures, F) { - BOOST_TEST(F::zero.last_non_zero() == F::VectType::Size()); - BOOST_TEST(F::V01.last_non_zero() == 1u); - BOOST_TEST(F::PPa.last_non_zero() == F::VectType::Size() - 1); - BOOST_TEST(F::V01.last_non_zero() == 1u); - BOOST_TEST(F::V01.last_non_zero(1) == F::VectType::Size()); - BOOST_TEST(F::PPa.last_non_zero(5) == 3u); - BOOST_TEST(F::PPa.last_non_zero(3) == 2u); + BOOST_TEST(F::zero.last_non_zero() == F::VectType::Size()); + BOOST_TEST(F::V01.last_non_zero() == 1u); + BOOST_TEST(F::PPa.last_non_zero() == F::VectType::Size() - 1); + BOOST_TEST(F::V01.last_non_zero() == 1u); + BOOST_TEST(F::V01.last_non_zero(1) == F::VectType::Size()); + BOOST_TEST(F::PPa.last_non_zero(5) == 3u); + BOOST_TEST(F::PPa.last_non_zero(3) == 2u); } BOOST_FIXTURE_TEST_CASE_TEMPLATE(permuted_test, F, Fixtures, F) { @@ -266,7 +260,8 @@ template struct PermFixture : public IsPermFunctions<_Perm> { PermFixture() : id(PermType::one()), RandPerm({3, 1, 0, 5, 10, 2, 11, 6, 7, 4, 8, 9}), Plist({id, RandPerm}) { - for (uint64_t i = 0; i < std::min(PermType::size(), 30) - 1; i++) + for (uint64_t i = 0; i < std::min(PermType::size(), 30) - 1; + i++) Plist.push_back(PermType::elementary_transposition(i)); for (uint64_t i = std::max(30, PermType::size() - 20); i < PermType::size() - 1; i++) @@ -285,14 +280,13 @@ template struct PermFixture : public IsPermFunctions<_Perm> { //____________________________________________________________________________// -typedef boost::mpl::list< - PermFixture, - PermFixture>, - PermFixture>, - PermFixture>, - PermFixture>, - PermFixture>, - PermFixture>> +typedef boost::mpl::list, + PermFixture>, + PermFixture>, + PermFixture>, + PermFixture>, + PermFixture>, + PermFixture>> PermFixtures; //____________________________________________________________________________//