[libpeas] Added a test for running PeasEngine's dispose



commit 30d41d46993a3e7231c2e0e45dce6b5b142c3ede
Author: Garrett Regier <alias301 gmail com>
Date:   Sun Feb 6 03:46:33 2011 -0800

    Added a test for running PeasEngine's dispose
    
    It has been broken before and this would have shown that.

 tests/libpeas/engine.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/tests/libpeas/engine.c b/tests/libpeas/engine.c
index 2751c2a..e60dfb1 100644
--- a/tests/libpeas/engine.c
+++ b/tests/libpeas/engine.c
@@ -76,6 +76,15 @@ test_engine_new (PeasEngine *engine)
 }
 
 static void
+test_engine_dispose (PeasEngine *engine)
+{
+  /* Yes this really has failed before */
+  g_object_run_dispose (G_OBJECT (engine));
+  g_object_run_dispose (G_OBJECT (engine));
+  g_object_run_dispose (G_OBJECT (engine));
+}
+
+static void
 test_engine_get_default (PeasEngine *engine)
 {
   g_assert (engine == peas_engine_get_default ());
@@ -351,6 +360,7 @@ main (int    argc,
               test_setup, test_runner, test_teardown)
 
   TEST ("new", new);
+  TEST ("dispose", dispose);
   TEST ("get-default", get_default);
 
   TEST ("load-plugin", load_plugin);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]