mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 16:24:18 +08:00
Make EmbeddedStorageRegistry ctor protected
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
fa03aa9a40
commit
5a613405c6
@@ -1493,7 +1493,10 @@ TEST_F(BuiltInTests, WhenJoiningPathThenPathsAreJoinedWithCorrectSeparator) {
|
||||
}
|
||||
|
||||
TEST_F(BuiltInTests, GivenFileNameWhenGettingKernelFromEmbeddedStorageRegistryThenValidPtrIsReturnedForExisitngKernels) {
|
||||
EmbeddedStorageRegistry storageRegistry;
|
||||
class MockEmbeddedStorageRegistry : public EmbeddedStorageRegistry {
|
||||
using EmbeddedStorageRegistry::EmbeddedStorageRegistry;
|
||||
};
|
||||
MockEmbeddedStorageRegistry storageRegistry;
|
||||
|
||||
std::string resource = "__kernel";
|
||||
storageRegistry.store("kernel.cl", createBuiltinResource(resource.data(), resource.size() + 1));
|
||||
|
||||
@@ -111,14 +111,15 @@ struct EmbeddedStorageRegistry {
|
||||
|
||||
const BuiltinResourceT *get(const std::string &name) const;
|
||||
|
||||
EmbeddedStorageRegistry() {
|
||||
exists = true;
|
||||
}
|
||||
~EmbeddedStorageRegistry() {
|
||||
exists = false;
|
||||
}
|
||||
|
||||
private:
|
||||
protected:
|
||||
EmbeddedStorageRegistry() {
|
||||
exists = true;
|
||||
}
|
||||
|
||||
using ResourcesContainer = std::unordered_map<std::string, BuiltinResourceT>;
|
||||
ResourcesContainer resources;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user