diff options
author | Marco Bubke <marco.bubke@qt.io> | 2019-08-26 16:33:26 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2019-08-27 11:54:06 +0000 |
commit | 99e841d140d86e8e3dce56292d253b241260050f (patch) | |
tree | 007247f1516a654348be62963f502a1a5f026054 /tests/unit | |
parent | bcd9a3dfbdeedee2550c9b44858538148e8a83fd (diff) | |
download | qt-creator-99e841d140d86e8e3dce56292d253b241260050f.tar.gz |
UnitTests: Add return value to mock function
Otherwise we try to get access a negative index. The real implementation
will never return a negative value, so the shouldn't the mock function.
Change-Id: I369e168bd18530b39fa5e2a622a716b30b8b344c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/unittest/projectupdater-test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/unittest/projectupdater-test.cpp b/tests/unit/unittest/projectupdater-test.cpp index 1b9f271687..52e68b308c 100644 --- a/tests/unit/unittest/projectupdater-test.cpp +++ b/tests/unit/unittest/projectupdater-test.cpp @@ -316,7 +316,7 @@ TEST_F(ProjectUpdater, ProjectPartIdsPrefetchingInsideTransaction) settingsManager}; EXPECT_CALL(mockSqliteTransactionBackend, deferredBegin()); - EXPECT_CALL(mockProjectPartsStorage, fetchProjectPartIdUnguarded(Eq(projectPartName))); + EXPECT_CALL(mockProjectPartsStorage, fetchProjectPartIdUnguarded(Eq(projectPartName))).WillOnce(Return(1)); EXPECT_CALL(mockSqliteTransactionBackend, commit()); updater.fetchProjectPartIds({&projectPart}); |