graphics.Region

10 views
Skip to first unread message

Heeno

unread,
Jul 1, 2020, 10:38:38 PM7/1/20
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!
Reply all
Reply to author
Forward
0 new messages