-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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-coverage]: change visibility for uncovered locations #14845
[move-coverage]: change visibility for uncovered locations #14845
Conversation
⏱️ 2h 28m total CI duration on this PR
|
@@ -27,15 +27,23 @@ use std::{ | |||
str::FromStr, | |||
}; | |||
|
|||
/// Function source coverage. |
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.
/// Function source coverage. | |
/// Source-level coverage information for a function. |
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.
Done
#[derive(Clone, Debug, Serialize)] | ||
pub struct FunctionSourceCoverage { | ||
/// Indication for native functions. |
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.
/// Indication for native functions. | |
/// Is this a native function? | |
/// If so, then `uncovered_locations` is empty. |
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.
Done
pub fn_is_native: bool, | ||
|
||
/// List of uncovered locations in the function. |
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.
/// List of uncovered locations in the function. | |
/// List of source locations in the function that were not covered. |
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.
I haven't looked at the code deeply, I am assuming this is what it means from looking here. Please double check.
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.
Yes, that's right! I'm using this in the move-mutation-test
a lot these days.
Done
#[derive(Debug, Serialize)] | ||
pub struct SourceCoverageBuilder<'a> { | ||
uncovered_locations: BTreeMap<Identifier, FunctionSourceCoverage>, | ||
/// List of uncovered locations in the source code. |
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.
Mapping from function name to the source-level uncovered locations for that function.
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.
Done
/// List of uncovered locations in the source code. | ||
pub uncovered_locations: BTreeMap<Identifier, FunctionSourceCoverage>, | ||
|
||
/// Source map. |
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.
Redundant comment, remove.
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.
Done
In the `move-mutation-test` tool, the `uncovered_locations` from `SourceCoverageBuilder` are going to be used to generate mutants for specific pieces of source code that hasn't been covered by the unit test coverage.
2dbeacf
to
9184d05
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14845 +/- ##
=======================================
Coverage 59.8% 59.8%
=======================================
Files 853 853
Lines 208159 208163 +4
=======================================
+ Hits 124530 124547 +17
+ Misses 83629 83616 -13 ☔ View full report in Codecov by Sentry. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Description
In the
move-mutation-test
tool, theuncovered_locations
fromSourceCoverageBuilder
are going to be used to generate mutants for specific pieces of source code that hasn't been covered by the unit test coverage.How Has This Been Tested?
N/A
Key Areas to Review
N/A
Type of Change
Which Components or Systems Does This Change Impact?
Checklist