forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -316,7 +316,7 @@ TEST_F(ProjectUpdater, ProjectPartIdsPrefetchingInsideTransaction)
|
|||||||
settingsManager};
|
settingsManager};
|
||||||
|
|
||||||
EXPECT_CALL(mockSqliteTransactionBackend, deferredBegin());
|
EXPECT_CALL(mockSqliteTransactionBackend, deferredBegin());
|
||||||
EXPECT_CALL(mockProjectPartsStorage, fetchProjectPartIdUnguarded(Eq(projectPartName)));
|
EXPECT_CALL(mockProjectPartsStorage, fetchProjectPartIdUnguarded(Eq(projectPartName))).WillOnce(Return(1));
|
||||||
EXPECT_CALL(mockSqliteTransactionBackend, commit());
|
EXPECT_CALL(mockSqliteTransactionBackend, commit());
|
||||||
|
|
||||||
updater.fetchProjectPartIds({&projectPart});
|
updater.fetchProjectPartIds({&projectPart});
|
||||||
|
Reference in New Issue
Block a user