Skip to content

Commit b42beac

Browse files
committed
fixed code smells
1 parent 8c2f0fb commit b42beac

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

applications/GeoMechanicsApplication/tests/cpp_tests/custom_processes/test_apply_constant_interpolate_line_pressure_process.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ KRATOS_TEST_CASE_IN_SUITE(ApplyConstantInterpolateLinePressureProcess_Constructi
6969
"table": 1
7070
})");
7171

72-
ApplyConstantInterpolateLinePressureProcess process(r_model_part, params);
72+
EXPECT_NO_THROW(ApplyConstantInterpolateLinePressureProcess process(r_model_part, params));
7373
}
7474

7575
KRATOS_TEST_CASE_IN_SUITE(ApplyConstantInterpolateLinePressureProcess_ThrowsOnInvalidDirections, KratosGeoMechanicsFastSuite)
@@ -102,7 +102,7 @@ KRATOS_TEST_CASE_IN_SUITE(ApplyConstantInterpolateLinePressureProcess_ExecuteIni
102102

103103
// Set initial pressure values for boundary nodes
104104
for (auto& r_node : r_model_part.Nodes()) {
105-
r_node.FastGetSolutionStepValue(WATER_PRESSURE) = 10.0 * r_node.Id();
105+
r_node.FastGetSolutionStepValue(WATER_PRESSURE) = 10.0 * static_cast<double>(r_node.Id());
106106
}
107107

108108
Parameters params(R"({
@@ -121,7 +121,7 @@ KRATOS_TEST_CASE_IN_SUITE(ApplyConstantInterpolateLinePressureProcess_ExecuteIni
121121

122122
// Check that pressure is set and fixed
123123
for (auto& r_node : r_model_part.Nodes()) {
124-
KRATOS_CHECK(r_node.IsFixed(WATER_PRESSURE));
124+
KRATOS_CHECK(r_node.IsFixed(WATER_PRESSURE))
125125
KRATOS_CHECK_DOUBLE_EQUAL(r_node.FastGetSolutionStepValue(WATER_PRESSURE), 10.0 * r_node.Id());
126126
}
127127
}
@@ -204,6 +204,7 @@ KRATOS_TEST_CASE_IN_SUITE(ApplyConstantInterpolateLinePressureProcess_Info, Krat
204204
})");
205205

206206
ApplyConstantInterpolateLinePressureProcess process(r_model_part, params);
207-
KRATOS_CHECK_STRING_EQUAL(process.Info(), "ApplyConstantInterpolateLinePressureProcess");
207+
KRATOS_EXPECT_EQ(process.Info(), "ApplyConstantInterpolateLinePressureProcess");
208208
}
209+
209210
} // namespace

0 commit comments

Comments
 (0)