You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Robolectric
Hello! I am trying to test some code that involves creating android.graphics.Region objects. When I run my tests, the Region constructor always returns null. I'm guessing this is because it's looking for a native constructor. While stumbling around looking for a solution, I came across ShadowRegion, which seems like a barebones shadow just to make things run w/o exploding. Is my understanding correct that Region() is expected to return null in a Robolectric context? Is there anyway to make this work properly? a custom shadow perhaps? is anybody able to point me to a good example of this (shadowing native constructor)? Thank you!