Fix clang-tidy failures in AWH tests
authorArtem Zhmurov <zhmurov@gmail.com>
Thu, 11 Mar 2021 04:40:32 +0000 (07:40 +0300)
committerPaul Bauer <paul.bauer.q@gmail.com>
Thu, 11 Mar 2021 08:24:19 +0000 (08:24 +0000)
Commit d4610e91e7815756f728e68785b58b884aead153 introduced a
clang-tidy warning in AWH tests with integer used in place of
bool argument (modernize-use-bool-literals,-warnings-as-errors).
This removes these warnings.

src/gromacs/applied_forces/awh/tests/bias.cpp
src/gromacs/applied_forces/awh/tests/biasstate.cpp

index 85e033ef9fbfc527fcdaa133c37280fb4df9382c..e1015c5b6de53a7afa4ba70e2b41465d3ee40d5c 100644 (file)
@@ -115,7 +115,7 @@ public:
         auto awhDimBuffer   = awhDimParamSerialized();
         auto awhDimArrayRef = gmx::arrayRefFromArray(&awhDimBuffer, 1);
         params_             = std::make_unique<AwhTestParameters>(getAwhTestParameters(
-                eawhgrowth, eawhpotential, awhDimArrayRef, 0, 0.4, false, 0.5, 0));
+                eawhgrowth, eawhpotential, awhDimArrayRef, false, 0.4, false, 0.5, 0));
 
         seed_ = params_->awhParams.seed();
 
@@ -234,7 +234,7 @@ TEST(BiasTest, DetectsCovering)
     const AwhTestParameters params = getAwhTestParameters(AwhHistogramGrowthType::ExponentialLinear,
                                                           AwhPotentialType::Convolved,
                                                           awhDimArrayRef,
-                                                          0,
+                                                          false,
                                                           0.4,
                                                           false,
                                                           0.5,
index fdffe31cfe4160b7d4235f0256dcd152ef74f04c..2fad0ae2ac910f61f196c80cc5764f7604920fd8 100644 (file)
@@ -93,7 +93,7 @@ public:
                     coordinateProvider, coordIndex, origin, end, period, diffusion));
         }
         params_                          = std::make_unique<AwhTestParameters>(getAwhTestParameters(
-                AwhHistogramGrowthType::Linear, AwhPotentialType::Convolved, awhDimParameters, 1, 1.0, false, 0.5, 0));
+                AwhHistogramGrowthType::Linear, AwhPotentialType::Convolved, awhDimParameters, true, 1.0, false, 0.5, 0));
         const AwhParams&       awhParams = params_->awhParams;
         const AwhBiasParams&   awhBiasParams = awhParams.awhBiasParams()[0];
         std::vector<DimParams> dimParams;