-
Notifications
You must be signed in to change notification settings - Fork 64
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
Move ImageSemanticsMapper reflection functions into ReflectionUtils #2419
Conversation
@@ -97,4 +112,39 @@ internal class ReflectionUtils { | |||
fun getClipShape(modifier: Modifier): Shape? { | |||
return ComposeReflection.ClipShapeField?.getSafe(modifier) as? Shape | |||
} | |||
|
|||
fun getBitmapInVectorPainter(vectorPainter: VectorPainter): Bitmap? { |
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.
❔ question: Do you have tests for these functions that you moved here ?
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.
No, reflection functions are tricky to test, they heavily depend on runtime environment. That's why I move all the reflection functions into this single class, and we are able to mock it and ensure the other parts by unit test.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #2419 +/- ##
===========================================
+ Coverage 70.09% 70.20% +0.12%
===========================================
Files 768 769 +1
Lines 28529 28530 +1
Branches 4783 4782 -1
===========================================
+ Hits 19995 20029 +34
+ Misses 7194 7163 -31
+ Partials 1340 1338 -2
|
What does this PR do?
This is a follow up commit of this PR
Move ImageSemanticsMapper reflection functions into ReflectionUtils
Review checklist (to be filled by reviewers)