From 8e00351aeb856bf7260ddd88c1555c6e98c92428 Mon Sep 17 00:00:00 2001 From: Hayden Hollenbeck Date: Thu, 5 Dec 2024 07:59:13 -0600 Subject: [PATCH] Removed native_array_from for fixed size array argument --- .../optical/RayleighMfpCalculator.test.cc | 24 +++++++------------ test/celeritas/optical/ValidationUtils.hh | 14 ----------- .../optical/detail/ValidationUtilsImpl.hh | 14 ----------- 3 files changed, 8 insertions(+), 44 deletions(-) diff --git a/test/celeritas/optical/RayleighMfpCalculator.test.cc b/test/celeritas/optical/RayleighMfpCalculator.test.cc index 15e394e416..ffbfa6fc02 100644 --- a/test/celeritas/optical/RayleighMfpCalculator.test.cc +++ b/test/celeritas/optical/RayleighMfpCalculator.test.cc @@ -34,22 +34,14 @@ class RayleighMfpCalculatorTest : public OpticalMockTestBase // Check calculated MFPs match expected ones TEST_F(RayleighMfpCalculatorTest, mfp_table) { - static constexpr auto expected_mfps - = native_array_from({ - 1189584.7068151, - 682569.13017288, - 343507.60086802, - 12005096.767467, - 6888377.4406869, - 3466623.2384762, - 1189584.7068151, - 277.60444893823, - 11510.805603078, - 322.70360179716, - 4.230373664558, - 12005096.767467, - 2801.539271218, - }); + static constexpr auto expected_mfps = native_array_from( + // clang-format off + 1189584.7068151, 682569.13017288, 343507.60086802, 12005096.767467, + 6888377.4406869, 3466623.2384762, 1189584.7068151, 277.60444893823, + 11510.805603078, 322.70360179716, 4.230373664558, 12005096.767467, + 2801.539271218 + // clang-format on + ); auto core_materials = this->material(); auto const& opt_materials = this->imported_data().optical_materials; diff --git a/test/celeritas/optical/ValidationUtils.hh b/test/celeritas/optical/ValidationUtils.hh index b05cd380fd..8babe5d958 100644 --- a/test/celeritas/optical/ValidationUtils.hh +++ b/test/celeritas/optical/ValidationUtils.hh @@ -51,20 +51,6 @@ Array constexpr native_array_from(Args const&... arg native_value_from(UnitType(args))...}; } -//---------------------------------------------------------------------------// -/*! - * Helper function to annotate units of a hard-coded test data array. - * - * This overload accepts fixed size \c Arrays which clang-format handles - * better. - */ -template -Array constexpr native_array_from(Array const& arr) -{ - return ::celeritas::testdetail::native_array_from_indexer( - arr, std::make_integer_sequence{}); -} - //---------------------------------------------------------------------------// /*! * Helper function to annotate units of hard-coded test data. diff --git a/test/celeritas/optical/detail/ValidationUtilsImpl.hh b/test/celeritas/optical/detail/ValidationUtilsImpl.hh index 4976eca14f..ec1860151d 100644 --- a/test/celeritas/optical/detail/ValidationUtilsImpl.hh +++ b/test/celeritas/optical/detail/ValidationUtilsImpl.hh @@ -160,20 +160,6 @@ template return result; } -//---------------------------------------------------------------------------// -/*! - * Helper function for \c native_array_from. - * - * Forwards \c Array values as a parameter pack using \c std::integer_sequence. - */ -template -Array constexpr native_array_from_indexer( - Array const& arr, - std::integer_sequence) -{ - return ::celeritas::optical::test::native_array_from(arr[Is]...); -} - //---------------------------------------------------------------------------// } // namespace testdetail } // namespace celeritas