Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Ignore implicit functions #400

Merged
merged 6 commits into from
Jun 22, 2022
Merged

Ignore implicit functions #400

merged 6 commits into from
Jun 22, 2022

Conversation

liamappelbe
Copy link
Contributor

@liamappelbe liamappelbe commented Jun 16, 2022

For example, fields of a class have implicit getters and setters that are auto-generated by the VM/frontend:

class SomeClass {
  SomeClass() : x = 123;

  // Creates an implicit getter and setter that should be ignored.
  int x;
}

These functions are excluded from the vm_service source report, so they will always appear as misses in the final coverage report. This is ok, because we can just ignore them in the function coverage report too, since they will never contain functionality that the user should care about testing.

Also add a proper function coverage test.

Fixes dart-lang/tools#501

@liamappelbe liamappelbe marked this pull request as ready for review June 21, 2022 22:29
@liamappelbe liamappelbe requested review from natebosch and kevmoo June 21, 2022 22:31
Copy link
Contributor

@kevmoo kevmoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's tough to see what would be skipped here. Could you include an example?

@liamappelbe
Copy link
Contributor Author

It's tough to see what would be skipped here. Could you include an example?

Added an example to the CL description

@coveralls
Copy link

Coverage Status

Coverage increased (+0.01%) to 93.084% when pulling b3eba93 on ignore_implicit_funcs into 92c480b on master.

@liamappelbe liamappelbe merged commit b6f1d41 into master Jun 22, 2022
@liamappelbe liamappelbe deleted the ignore_implicit_funcs branch June 22, 2022 22:36
mosuem pushed a commit to dart-lang/tools that referenced this pull request Aug 28, 2024
* Fix branch coverage test

* Ignore implicit functions in function coverage

* Add a dedicated function coverage test.

* Fix analysis
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Function coverage should ignore implicit functions
4 participants