Skip to content

Commit

Permalink
Removed a redundant C++ unit test wrapper
Browse files Browse the repository at this point in the history
Removed test script `test_normal_flux_condition.py`, which executed two
C++ unit tests: `TestCalculateHorizontalNormalFlux` and
`TestCalculateInclinedNormalFlux`. These unit tests, however, are also
executed through test script `run_cpp_tests.py`, since both are part of
test suite `KratosGeoMechanicsFastSuite`. As such, the former test
script was redundant and it has been removed now.

A few other changes were carried out to address three code smells
reported by SonarQube and some problems detected by Clang-tidy.
  • Loading branch information
avdg81 committed Feb 8, 2024
1 parent 7edecdc commit efd636e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@
//

#include <string>
#include <iostream>

// Project includes
#include "containers/model.h"
#include "testing/testing.h"
#include "custom_conditions/Pw_normal_flux_condition.hpp"

namespace Kratos
namespace Kratos::Testing
{
namespace Testing
{

KRATOS_TEST_CASE_IN_SUITE(CalculateHorizontalNormalFlux, KratosGeoMechanicsFastSuite)
{

Expand Down Expand Up @@ -58,7 +54,6 @@ namespace Kratos

// Create the test piping element
std::vector<ModelPart::IndexType> cond_nodes{1, 2};
// auto p_element = r_model_part.CreateNewElement("SteadyStatePwPipingElement2D4N", 1, element_nodes, p_elem_prop);
auto cond = r_model_part.CreateNewCondition("PwNormalFluxCondition2D2N", 1, cond_nodes, cond_prop);
// Initialize the element to initialize the constitutive law
const auto &r_process_info = r_model_part.GetProcessInfo();
Expand Down Expand Up @@ -122,7 +117,6 @@ namespace Kratos

// Create the test piping element
std::vector<ModelPart::IndexType> cond_nodes{1, 2};
// auto p_element = r_model_part.CreateNewElement("SteadyStatePwPipingElement2D4N", 1, element_nodes, p_elem_prop);
auto cond = r_model_part.CreateNewCondition("PwNormalFluxCondition2D2N", 1, cond_nodes, cond_prop);
// Initialize the element to initialize the constitutive law
const auto &r_process_info = r_model_part.GetProcessInfo();
Expand Down Expand Up @@ -150,6 +144,4 @@ namespace Kratos
1.0e-6);
}
}

}
}

This file was deleted.

0 comments on commit efd636e

Please sign in to comment.