Add UnaryExpr, BinaryExpr, and some record/enum tests to improve overall test coverage#4930
Conversation
|
Check failed due to a connection issue: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4930 +/- ##
===============================================
+ Coverage 58.445% 58.460% +0.015%
Complexity 2560 2560
===============================================
Files 689 689
Lines 39553 39553
Branches 7176 7176
===============================================
+ Hits 23117 23123 +6
+ Misses 13497 13491 -6
Partials 2939 2939
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
@jlerbsc what are your thoughts on adding tests like these? Should I just keep adding tests for simple cases like these when there's a gap in our test coverage, even if the tests themselves are very basic? |
If you think these tests add value, then you can write them, but don't go overboard, as it can become time-consuming. For me, the most important thing is to fix bugs to make Javaparser more reliable. |
I wouldn't go out of my way to write tests, but I wrote these as part of figuring out what works and what doesn't when investigating the grammar issue |
While working on #4929 and the upcoming compact class PR I added the following tests. These are mostly sanity-checks that already passed and aren't strictly related to either of those changes, but are still worth having for the sake of overall test coverage to potentially catch future regressions. I think it makes more sense to add as a separate PR instead of including this in either of the other PRs, distracting from the main purpose of those.
These tests are mostly AI-generated, but I did verify them myself and fixed a few issues manually.