Skip to content

Commit

Permalink
Fix issue in the number of shrinks
Browse files Browse the repository at this point in the history
One extra shrinks was counted
  • Loading branch information
dubzzz committed Mar 28, 2018
1 parent d25d233 commit e3ecc3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/check/runner/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class RunExecution<Ts> {

private isSuccess = (): boolean => this.pathToFailure == null;
private firstFailure = (): number => this.pathToFailure ? +this.pathToFailure.split(':')[0] : -1;
private numShrinks = (): number => this.pathToFailure ? this.pathToFailure.split(':').length : 0;
private numShrinks = (): number => this.pathToFailure ? this.pathToFailure.split(':').length -1 : 0;

public toRunDetails(qParams: QualifiedParameters): RunDetails<Ts> {
return this.isSuccess()
Expand Down
2 changes: 1 addition & 1 deletion test/unit/check/runner/Runner.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ describe('Runner', () => {
assert.ok(out.failed);
assert.equal(out.seed, seed);
assert.equal(out.num_runs, failurePoints[0] +1);
assert.equal(out.num_shrinks, failurePoints.length);
assert.equal(out.num_shrinks, failurePoints.length -1);
assert.equal(out.counterexample_path, expectedFailurePath);
})
));
Expand Down

0 comments on commit e3ecc3c

Please sign in to comment.