mirror of
https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git
synced 2025-05-15 01:08:39 +00:00
layer: Add env var prefix override for back compatibility
This commit is contained in:
parent
21ded6ed67
commit
dc1acf9e37
9 changed files with 88 additions and 39 deletions
|
@ -263,7 +263,7 @@ TEST(test_layer_settings_util, TrimVendor) {
|
|||
|
||||
TEST(test_layer_settings_util, GetEnvSettingName_TrimNone) {
|
||||
{
|
||||
const std::string result = vl::GetEnvSettingName("VK_LAYER_LUNARG_test", "log_mode", vl::TRIM_NONE);
|
||||
const std::string result = vl::GetEnvSettingName("VK_LAYER_LUNARG_test", nullptr, "log_mode", vl::TRIM_NONE);
|
||||
|
||||
EXPECT_STREQ("VK_LUNARG_TEST_LOG_MODE", result.c_str());
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ TEST(test_layer_settings_util, GetEnvSettingName_TrimNone) {
|
|||
|
||||
TEST(test_layer_settings_util, GetEnvSettingName_TrimVendor) {
|
||||
{
|
||||
const std::string result = vl::GetEnvSettingName("VK_LAYER_LUNARG_test", "log_mode", vl::TRIM_VENDOR);
|
||||
const std::string result = vl::GetEnvSettingName("VK_LAYER_LUNARG_test", nullptr, "log_mode", vl::TRIM_VENDOR);
|
||||
|
||||
EXPECT_STREQ("VK_TEST_LOG_MODE", result.c_str());
|
||||
}
|
||||
|
@ -279,12 +279,20 @@ TEST(test_layer_settings_util, GetEnvSettingName_TrimVendor) {
|
|||
|
||||
TEST(test_layer_settings_util, GetEnvSettingName_TrimNamespace) {
|
||||
{
|
||||
const std::string result = vl::GetEnvSettingName("VK_LAYER_LUNARG_test", "log_mode", vl::TRIM_NAMESPACE);
|
||||
const std::string result = vl::GetEnvSettingName("VK_LAYER_LUNARG_test", nullptr, "log_mode", vl::TRIM_NAMESPACE);
|
||||
|
||||
EXPECT_STREQ("VK_LOG_MODE", result.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
TEST(test_layer_settings_util, GetEnvSettingName_TrimAddPrefix) {
|
||||
{
|
||||
const std::string result = vl::GetEnvSettingName("VK_LAYER_LUNARG_test", "LAYER", "log_mode", vl::TRIM_NAMESPACE);
|
||||
|
||||
EXPECT_STREQ("VK_LAYER_LOG_MODE", result.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
TEST(test_layer_settings_util, GetFileSettingName) {
|
||||
{
|
||||
const std::string result = vl::GetFileSettingName("VK_LAYER_LUNARG_test", "log_mode");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue