-static void test_invalid(const char *plugin_dir)
-{
- struct bt_plugin *plugin;
- char *invalid_path = get_test_plugin_path(plugin_dir, "invalid");;
-
- assert(invalid_path);
-
- plugin = bt_plugin_create_from_file(NON_EXISTING_PATH);
- ok(!plugin, "bt_plugin_create_from_file() fails with a non-existing file");
-
- plugin = bt_plugin_create_from_file(plugin_dir);
- ok(!plugin, "bt_plugin_create_from_file() fails with a directory");
-
- plugin = bt_plugin_create_from_file(invalid_path);
- ok(!plugin, "bt_plugin_create_from_file() fails with an invalid plugin file");
-
- ok(!bt_plugin_create_from_file(NULL),
- "bt_plugin_create_from_file() handles NULL correctly");
- ok(!bt_plugin_create_all_from_dir(NULL, false),
- "bt_plugin_create_all_from_dir() handles NULL correctly");
- ok(!bt_plugin_get_name(NULL),
- "bt_plugin_get_name() handles NULL correctly");
- ok(!bt_plugin_get_description(NULL),
- "bt_plugin_get_description() handles NULL correctly");
- ok(!bt_plugin_get_author(NULL),
- "bt_plugin_get_author() handles NULL correctly");
- ok(!bt_plugin_get_license(NULL),
- "bt_plugin_get_license() handles NULL correctly");
- ok(!bt_plugin_get_path(NULL),
- "bt_plugin_get_path() handles NULL correctly");
- ok(bt_plugin_get_component_class_count(NULL) < 0,
- "bt_plugin_get_component_class_count() handles NULL correctly");
- ok(!bt_plugin_get_component_class(NULL, 0),
- "bt_plugin_get_component_class() handles NULL correctly");
- ok(!bt_plugin_get_component_class_by_name_and_type(NULL, NULL, 0),
- "bt_plugin_get_component_class_by_name_and_type() handles NULL correctly");
-
- free(invalid_path);