Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Paramuzov <[email protected]>
  • Loading branch information
vladimir-paramuzov committed Jan 27, 2025
1 parent 64b4e1b commit ea3c7c1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/inference/src/dev/plugin_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ ov::AnyMap PluginConfig::read_config_file(const std::string& filename, const std
nlohmann::json json_config;
try {
ifs >> json_config;
} catch (const std::exception& e) {
} catch (const std::exception&) {
return config;
}

Expand Down
10 changes: 8 additions & 2 deletions src/inference/tests/unit/config_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ TEST(plugin_config, can_create_empty_config) {
TEST(plugin_config, can_create_not_empty_config) {
ASSERT_NO_THROW(
NotEmptyTestConfig cfg;
#ifdef ENABLE_DEBUG_CAPS
ASSERT_EQ(cfg.get_supported_properties().size(), 7);
#else
ASSERT_EQ(cfg.get_supported_properties().size(), 5);
#endif
);
}

Expand Down Expand Up @@ -237,11 +241,13 @@ TEST(plugin_config, set_property_throw_for_non_release_options) {
TEST(plugin_config, visibility_is_correct) {
NotEmptyTestConfig cfg;
ASSERT_EQ(cfg.get_option_ptr(release_internal_property.name())->get_visibility(), OptionVisibility::RELEASE_INTERNAL);
ASSERT_EQ(cfg.get_option_ptr(debug_property.name())->get_visibility(), OptionVisibility::DEBUG);
ASSERT_EQ(cfg.get_option_ptr(int_property.name())->get_visibility(), OptionVisibility::RELEASE);
}

#ifdef ENABLE_DEBUG_CAPS
ASSERT_EQ(cfg.get_option_ptr(debug_property.name())->get_visibility(), OptionVisibility::DEBUG);
#endif
}

TEST(plugin_config, can_get_global_property) {
NotEmptyTestConfig cfg;
ASSERT_EQ(cfg.get_debug_global_property(), 4);
Expand Down

0 comments on commit ea3c7c1

Please sign in to comment.