mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-04 19:29:07 +00:00
Re-blessed the partial_eq.rs coverage test
This commit is contained in:
parent
625803d77e
commit
b211acf683
@ -2,11 +2,11 @@
|
|||||||
2| |// structure of this test.
|
2| |// structure of this test.
|
||||||
3| |
|
3| |
|
||||||
4| 2|#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
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 {
|
5| |pub struct Version {
|
||||||
6| | major: usize,
|
6| | major: usize,
|
||||||
7| 1| minor: usize, // Count: 1 - `PartialOrd` compared `minor` values in 3.2.1 vs. 3.3.0
|
7| | minor: usize,
|
||||||
8| 0| patch: usize, // Count: 0 - `PartialOrd` was determined by `minor` (2 < 3)
|
8| | patch: usize,
|
||||||
9| |}
|
9| |}
|
||||||
10| |
|
10| |
|
||||||
11| |impl Version {
|
11| |impl Version {
|
||||||
@ -45,19 +45,4 @@
|
|||||||
44| |`function_source_hash` without a code region, if necessary.
|
44| |`function_source_hash` without a code region, if necessary.
|
||||||
45| |
|
45| |
|
||||||
46| |*/
|
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?
|
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
||||||
pub struct Version {
|
pub struct Version {
|
||||||
major: usize,
|
major: usize,
|
||||||
minor: usize, // Count: 1 - `PartialOrd` compared `minor` values in 3.2.1 vs. 3.3.0
|
minor: usize,
|
||||||
patch: usize, // Count: 0 - `PartialOrd` was determined by `minor` (2 < 3)
|
patch: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Version {
|
impl Version {
|
||||||
@ -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.
|
`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?
|
|
||||||
|
Loading…
Reference in New Issue
Block a user