-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GeoMechanicsApplication] Cleanup of the head extrapolation unit tests #12532
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for removing the duplication from this test code. It looks nice and clean to me. I have two very minor suggestions related to an #include
d header file and to rename two parameters to comply with the Kratos Style Guide.
@@ -10,112 +10,81 @@ | |||
// Main authors: Jonathan Nuttall | |||
// | |||
|
|||
#include <string> | |||
#include <iostream> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why we would need to include iostream
here. I do see that we use std::filesystem
. I've tried to replace iostream
by the more appropriate filesystem
and that seems to work.
#include <iostream> | |
#include <filesystem> |
What are your thoughts about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, done!
&flow_stubs::emptyCancel); | ||
|
||
const int status = execute.ExecuteFlowAnalysis(workingDirectory, projectFile, critical_head_info, "", call_back_functions); | ||
int RunTestCase(int test_case_number) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To follow the Kratos Style Guide, please rename the parameter as follows:
int RunTestCase(int test_case_number) | |
int RunTestCase(int TestCaseNumber) |
This suggestion also applies to the parameter of function CompareResults
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Richard, that is a very nice work. One non-blocking general comment.
|
||
KRATOS_EXPECT_TRUE(TestUtilities::CompareFiles(original, result)) | ||
return execute.ExecuteFlowAnalysis(workingDirectory.generic_string(), projectFile, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests work when return KratosExecute().ExecuteFlowAnalysis(...). What is your opinion on having line 35?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice suggestion, indeed makes it shorter and clearer in my opinion
📝 Description
Minor cleanup effort for the unit tests in
test_head_extrapolation_workflow.cpp
. I did the clean-up before, but didn't want to introduce more merge conflicts for the ci/gtests branch. Now that is done, this can be merged