-
Notifications
You must be signed in to change notification settings - Fork 97
test: Add unit tests for RTType.hpp #3452
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
base: develop
Are you sure you want to change the base?
Conversation
…EOS-DEV/GEOS into test/omarduran/unitest_rttypes
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3452 +/- ##
===========================================
+ Coverage 59.37% 59.43% +0.06%
===========================================
Files 1337 1340 +3
Lines 110835 111009 +174
===========================================
+ Hits 65804 65978 +174
Misses 45031 45031 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Should this PR be pushed? |
…EOS-DEV/GEOS into test/omarduran/unitest_rttypes
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.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…EOS-DEV/GEOS into test/omarduran/unitest_rttypes
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.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| #include "dataRepository/Group.hpp" | ||
| #include "dataRepository/Wrapper.hpp" |
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.
The test must be relocated because of circular dependancy.
I advise src/coreComponents/dataRepository.
| geos::Regex const & r = geos::rtTypes::getTypeRegex< int >( "integer_array2d" ); | ||
| ASSERT_FALSE( r.m_regexStr.empty() ); | ||
| std::regex re( r.m_regexStr ); | ||
| EXPECT_TRUE( std::regex_match( std::string( "{{1,2},{3,4}}" ), re ) ); | ||
| EXPECT_TRUE( std::regex_match( std::string( " { { 1 , 2 } , { 3 , 4 } } " ), re ) ); | ||
| EXPECT_FALSE( std::regex_match( std::string( "{1,2,3,4}" ), re ) ); // Not a 2d array pattern |
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.
Why not adding those formatting tests in the existing testXmlWrapper.cpp?
At least, can you specify the role of the two files (testRTTypes.cpp and testXmlWrapper.cpp) in a doxygen file header, so we know what needs to be tested in each one?
Introduces unit test for
RTTypes.hpp. Dedicated tests for runtime type utilities (dynamicCast, type name, regex, enum mapping). Other functions and structures are being testedRTTypes.hppto augment the test coverage.