Skip to content

Commit

Permalink
improve-debug-wording
Browse files Browse the repository at this point in the history
  • Loading branch information
apiraino committed Feb 6, 2024
1 parent 165a807 commit 0a54a66
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/least_satisfying.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,11 @@ pub enum Satisfies {

impl fmt::Display for Satisfies {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{:?}", self)
match self {
Self::Yes => write!(f, "Does not reproduce the regression"),
Self::No => write!(f, "Reproduces the regression"),
Self::Unknown => writeln!(f, "Unable to figure out if it reproduces the regression"),
}
}
}

Expand Down
8 changes: 6 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,9 @@ impl Config {

if !toolchains.is_empty() {
// validate commit at start of range
eprintln!("checking the start range to verify it passes");
eprintln!(
"checking the start range: testing the sample code, should not reproduce the regression"
);
let start_range_result = self.install_and_test(&toolchains[0], &dl_spec)?;
if start_range_result == Satisfies::Yes {
bail!(
Expand All @@ -1169,7 +1171,9 @@ impl Config {
}

// validate commit at end of range
eprintln!("checking the end range to verify it does not pass");
eprintln!(
"checking the end range: testing the sample code, should reproduce the regression"
);
let end_range_result =
self.install_and_test(&toolchains[toolchains.len() - 1], &dl_spec)?;
if end_range_result == Satisfies::No {
Expand Down

0 comments on commit 0a54a66

Please sign in to comment.