Skip to content
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

MavericksView creating uncoverable code #552

Open
alisonthemonster opened this issue Jun 6, 2021 · 2 comments
Open

MavericksView creating uncoverable code #552

alisonthemonster opened this issue Jun 6, 2021 · 2 comments

Comments

@alisonthemonster
Copy link
Contributor

Hi there! I'm using Mavericks for a few fragments and my project tracks code coverage. I've been testing my fragments using both MockableMavericksViews with screenshot tests and tests with espresso and plain MavericksViews. In both cases I'm not able to achieve passing code coverage because of code from MavericksView. Here's an example:
Screen Shot 2021-06-05 at 5 40 56 PM

Is there any way to test these functions, or is there something I'm missing here?

@elihart
Copy link
Contributor

elihart commented Jun 6, 2021

You shouldn't need to test functions that come from other libraries (like mavericks). Seems like your coverage setup needs to be configured to exclude 3rd party code?

@alisonthemonster
Copy link
Contributor Author

Do you have any examples of how to do this? My googling is just showing how to exclude entire classes.

I did find this issue for jacoco around interfaces with default methods in Kotlin: jacoco/jacoco#905
They talk about byte code so it goes a bit over my head there, but I wonder if its related. They had a fix for default methods with no parameters, and they have an in progress PR for default methods with parameters: jacoco/jacoco#1137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants