aboutsummaryrefslogtreecommitdiff
path: root/tests/indicator-fixture.h
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-11-05 10:59:25 -0600
committerTed Gould <ted@gould.cx>2014-11-05 10:59:25 -0600
commit292c19d6e75ee4fa83b71cea3820d0efa6ecc5b0 (patch)
treea3490ac944779cbcc1e98c928c38fcfaeed39a1f /tests/indicator-fixture.h
parent629fb9872de0626e957489b177f36e025f996abe (diff)
downloadayatana-indicator-sound-292c19d6e75ee4fa83b71cea3820d0efa6ecc5b0.tar.gz
ayatana-indicator-sound-292c19d6e75ee4fa83b71cea3820d0efa6ecc5b0.tar.bz2
ayatana-indicator-sound-292c19d6e75ee4fa83b71cea3820d0efa6ecc5b0.zip
Fix waiting on actions to count the number of actions
Diffstat (limited to 'tests/indicator-fixture.h')
-rw-r--r--tests/indicator-fixture.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/indicator-fixture.h b/tests/indicator-fixture.h
index 02dd885..987c7b7 100644
--- a/tests/indicator-fixture.h
+++ b/tests/indicator-fixture.h
@@ -136,10 +136,13 @@ class IndicatorFixture : public ::testing::Test
}
void agWaitForActions (const std::shared_ptr<GActionGroup>& group) {
- auto list = g_action_group_list_actions(group.get());
+ auto list = std::shared_ptr<gchar *>(
+ g_action_group_list_actions(group.get()),
+ [](gchar ** list) {
+ g_strfreev(list);
+ });
- if (list != nullptr) {
- g_strfreev(list);
+ if (g_strv_length(list.get()) != 0) {
return;
}