Fix for issue 725 casts on numeric references types causing exceptions#729
Fix for issue 725 casts on numeric references types causing exceptions#729
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #729 +/- ##
============================================
- Coverage 74.24% 74.23% -0.02%
- Complexity 3041 3044 +3
============================================
Files 108 108
Lines 9354 9360 +6
Branches 1857 1860 +3
============================================
+ Hits 6945 6948 +3
Misses 2070 2070
- Partials 339 342 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Looks good but we are loosing too much code coverage. Please add tests for the other paths too: Some or all of these conditions are missing: fromType == nullfromType.isPrimitive()!toType.isAssignableFrom( fromType )checkOnly == trueI know it is getting harder to maintain or even improve on the overall coverage, but the unit tests only cover a 3rd of this patch. |
It is not easy to write tests for all of these conditions. For example, how to I write a test for checkOnly when it is not exposed to the scripting environment? |
8e26e46 to
4e8d9dd
Compare
Surely we can write a test with the appropriate conditions to cover the condition without it being specifically exposed to the scripting environment. If we can't cover it then why is it implemented then, perhaps then we don't need the condition? |
My guess is that the code is there as a sanity check to ensure that the contract is being met. It would take a lot of auditing to make sure that those tests can be safely removed. I have no more tests to add for this one that will cover those existing code paths. |
No description provided.