Skip to content

Commit

Permalink
Fix the progres increase test
Browse files Browse the repository at this point in the history
The progress increase test must compare the input value against
the variable that contains a previous value, not against it's
initial value.
  • Loading branch information
Jaroslaw Kubik committed Jun 2, 2018
1 parent e05d333 commit 67ceae8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unittest/progress_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class QuickTest : public testing::Test {
ClassicMockProgressSink progressSink;

int currentProgress = -1;
EXPECT_CALL( progressSink, classicProgress(AllOf(Gt(currentProgress),Le(100))) )
EXPECT_CALL( progressSink, classicProgress(AllOf(Gt<int&>(currentProgress),Le(100))) )
.Times(AtLeast(5))
.WillRepeatedly( DoAll(SaveArg<0>(&currentProgress),
Return(false) ));
Expand Down Expand Up @@ -133,7 +133,7 @@ class QuickTest : public testing::Test {
int currentProgress = -1;
EXPECT_CALL( progressSink, classicProgress(_) )
.Times(0);
EXPECT_CALL( progressSink, progress(AllOf(Gt(currentProgress),Le(100))) )
EXPECT_CALL( progressSink, progress(AllOf(Gt<int&>(currentProgress),Le(100))) )
.Times(AtLeast(5))
.WillRepeatedly( DoAll(SaveArg<0>(&currentProgress),
Return(false) ));
Expand Down

0 comments on commit 67ceae8

Please sign in to comment.