Skip to content

Commit

Permalink
Re-blessed the partial_eq.rs coverage test
Browse files Browse the repository at this point in the history
  • Loading branch information
richkadel committed Feb 11, 2021
1 parent 625803d commit b211acf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
2| |// structure of this test.
3| |
4| 2|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
^0 ^0 ^0 ^0 ^1 ^0 ^0^0
^0 ^0 ^0 ^0 ^1 ^1 ^0^0
5| |pub struct Version {
6| | major: usize,
7| 1| minor: usize, // Count: 1 - `PartialOrd` compared `minor` values in 3.2.1 vs. 3.3.0
8| 0| patch: usize, // Count: 0 - `PartialOrd` was determined by `minor` (2 < 3)
7| | minor: usize,
8| | patch: usize,
9| |}
10| |
11| |impl Version {
Expand Down Expand Up @@ -45,19 +45,4 @@
44| |`function_source_hash` without a code region, if necessary.
45| |
46| |*/
47| |
48| |// FIXME(#79626): The derived traits get coverage, which is great, but some of the traits appear
49| |// to get two coverage execution counts at different positions:
50| |//
51| |// ```text
52| |// 4| 2|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
53| |// ^0 ^0 ^0 ^0 ^1 ^0 ^0^0
54| |// ```text
55| |//
56| |// `PartialEq`, `PartialOrd`, and `Ord` (and possibly `Eq`, if the trait name was longer than 2
57| |// characters) have counts at their first and last characters.
58| |//
59| |// Why is this? Why does `PartialOrd` have two values (1 and 0)? This must mean we are checking
60| |// distinct coverages, so maybe we don't want to eliminate one of them. Should we merge them?
61| |// If merged, do we lose some information?

19 changes: 2 additions & 17 deletions src/test/run-make-fulldeps/coverage/partial_eq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
pub struct Version {
major: usize,
minor: usize, // Count: 1 - `PartialOrd` compared `minor` values in 3.2.1 vs. 3.3.0
patch: usize, // Count: 0 - `PartialOrd` was determined by `minor` (2 < 3)
minor: usize,
patch: usize,
}

impl Version {
Expand Down Expand Up @@ -44,18 +44,3 @@ one expression, which is allowed, but the `function_source_hash` was only passed
`function_source_hash` without a code region, if necessary.
*/

// FIXME(#79626): The derived traits get coverage, which is great, but some of the traits appear
// to get two coverage execution counts at different positions:
//
// ```text
// 4| 2|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
// ^0 ^0 ^0 ^0 ^1 ^0 ^0^0
// ```text
//
// `PartialEq`, `PartialOrd`, and `Ord` (and possibly `Eq`, if the trait name was longer than 2
// characters) have counts at their first and last characters.
//
// Why is this? Why does `PartialOrd` have two values (1 and 0)? This must mean we are checking
// distinct coverages, so maybe we don't want to eliminate one of them. Should we merge them?
// If merged, do we lose some information?

0 comments on commit b211acf

Please sign in to comment.