Skip to content

Commit

Permalink
Tolerance >=. Closes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
cjrh committed Oct 24, 2021
1 parent 3ca4e3f commit 5bdd93b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ pub fn compare(base: PathBuf, comp: PathBuf, tolerance: f64) -> (usize, String)
comp_result.branch - base_result.branch,
);

let line_ok = (comp_result.line - base_result.line) > -tolerance;
let branch_ok = (comp_result.branch - base_result.branch) > -tolerance;
let line_ok = (comp_result.line - base_result.line) >= -tolerance;
let branch_ok = (comp_result.branch - base_result.branch) >= -tolerance;

let line_symbol = if line_ok { "✅" } else { "❌" };

Expand Down

0 comments on commit 5bdd93b

Please sign in to comment.