[libpeas: 10/18] Add tests for (un)loading plugins that are already (un)loaded
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas: 10/18] Add tests for (un)loading plugins that are already (un)loaded
- Date: Fri, 4 Mar 2011 09:40:40 +0000 (UTC)
commit 94174f6e7675e26850b92c9c9d7f12be7a9dadbe
Author: Garrett Regier <alias301 gmail com>
Date: Thu Mar 3 04:29:56 2011 -0800
Add tests for (un)loading plugins that are already (un)loaded
tests/libpeas/engine.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/tests/libpeas/engine.c b/tests/libpeas/engine.c
index 3a56ad5..74c9bac 100644
--- a/tests/libpeas/engine.c
+++ b/tests/libpeas/engine.c
@@ -114,6 +114,9 @@ test_engine_load_plugin (PeasEngine *engine)
g_assert (peas_engine_load_plugin (engine, info));
g_assert (peas_plugin_info_is_loaded (info));
+
+ /* Check that we can load a plugin that is already loaded */
+ g_assert (peas_engine_load_plugin (engine, info));
}
static void
@@ -164,10 +167,13 @@ test_engine_unload_plugin (PeasEngine *engine)
{
PeasPluginInfo *info;
- test_engine_load_plugin (engine);
-
info = peas_engine_get_plugin_info (engine, "loadable");
+ /* Check that we can unload a plugin that is not loaded */
+ g_assert (peas_engine_unload_plugin (engine, info));
+
+ test_engine_load_plugin (engine);
+
g_assert (peas_engine_unload_plugin (engine, info));
g_assert (!peas_plugin_info_is_loaded (info));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]