Unregister custom SettingsRegistries in the test Teardown
This commit is contained in:
+7
-1
@@ -49,7 +49,7 @@ void PlatformConfigurationUnitTests::SetUp()
|
||||
+ "/project_path";
|
||||
registry->Set(projectPathKey, "AutomatedTesting");
|
||||
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*registry);
|
||||
|
||||
|
||||
using namespace AssetProcessor;
|
||||
m_qApp = new QCoreApplication(m_argc, m_argv);
|
||||
AssetProcessorTest::SetUp();
|
||||
@@ -61,6 +61,12 @@ void PlatformConfigurationUnitTests::TearDown()
|
||||
AssetUtilities::ResetAssetRoot();
|
||||
delete m_qApp;
|
||||
AssetProcessor::AssetProcessorTest::TearDown();
|
||||
|
||||
auto settingsRegistry = AZ::SettingsRegistry::Get();
|
||||
if(settingsRegistry == &m_registry)
|
||||
{
|
||||
AZ::SettingsRegistry::Unregister(settingsRegistry);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(PlatformConfigurationUnitTests, TestFailReadConfigFile_BadPlatform)
|
||||
|
||||
Reference in New Issue
Block a user