Clang: Bulk add project file paths to database

This project part container generation because there is not anymore one
single access to the database for every file path.

Change-Id: I5f82022262fe89a976729d48ee4f098b74a1e1d1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2019-08-08 14:47:33 +02:00
parent 947cb9ed4e
commit 199746143a
12 changed files with 131 additions and 18 deletions

View File

@@ -25,8 +25,9 @@
#include "googletest.h"
#include "mockmutex.h"
#include "mockfilepathstorage.h"
#include "mockmutex.h"
#include "mocksqlitedatabase.h"
#include <stringcache.h>
@@ -72,7 +73,8 @@ protected:
}
protected:
NiceMock<MockFilePathStorage> mockStorage;
NiceMock<MockSqliteDatabase> mockDatabase;
NiceMock<MockFilePathStorage> mockStorage{mockDatabase};
StorageIdFunction mockStorageFetchDirectyId = [&] (Utils::SmallStringView string) {
return mockStorage.fetchDirectoryId(string);
};