diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2012-11-05 12:41:24 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2012-11-05 12:41:24 +0100 |
| commit | 0c14d7b7257e4b819e138d6f810714844a140a36 (patch) | |
| tree | a132a80f1803feafd3e3fef2a4720cb1df0c8b85 /tests/test-indicator.cc | |
| parent | a42d1cd4536ece4b86c7345966a801d03114fc60 (diff) | |
| parent | a3b85f41ef90ad23d9cbc943fd24856d2775cc7a (diff) | |
| download | ayatana-indicator-power-0c14d7b7257e4b819e138d6f810714844a140a36.tar.gz ayatana-indicator-power-0c14d7b7257e4b819e138d6f810714844a140a36.tar.bz2 ayatana-indicator-power-0c14d7b7257e4b819e138d6f810714844a140a36.zip | |
* New upstream release.
- Show the proper icon for mice and ups devices. (LP: #1066208)
Diffstat (limited to 'tests/test-indicator.cc')
| -rw-r--r-- | tests/test-indicator.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test-indicator.cc b/tests/test-indicator.cc index b9f7321..824a5ac 100644 --- a/tests/test-indicator.cc +++ b/tests/test-indicator.cc @@ -29,6 +29,16 @@ with this program. If not, see <http://www.gnu.org/licenses/>. namespace { + void quiet_log_func (const gchar *log_domain, + GLogLevelFlags log_level, + const gchar *message, + gpointer user_data) + { + // instantiating an indicator w/o a window causes lots + // of glib/gtk warnings... silence them so that they don't + // obscure any other warnings generated by the tests. + } + void ensure_glib_initialized () { static bool initialized = false; @@ -37,6 +47,8 @@ namespace { initialized = true; g_type_init(); + g_log_set_handler ("Gtk", (GLogLevelFlags)(G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING), quiet_log_func, NULL); + g_log_set_handler ("GLib-GObject", (GLogLevelFlags)(G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING), quiet_log_func, NULL); } } } @@ -71,6 +83,8 @@ class IndicatorTest : public ::testing::Test virtual void TearDown() { + ASSERT_EQ (1, G_OBJECT(battery_device)->ref_count); + ASSERT_EQ (1, G_OBJECT(ac_device)->ref_count); g_object_unref (battery_device); g_object_unref (ac_device); } |
