aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-11-04 18:15:20 -0600
committerTed Gould <ted@gould.cx>2014-11-04 18:15:20 -0600
commit1d95d42ff323a98d5f88f2897c93978511eaee46 (patch)
tree7be8e27816904737747e844c5da92859af0c01eb /tests
parent83f9f8e86cf85e7141cfc952ebff10714dcfe870 (diff)
downloadayatana-indicator-sound-1d95d42ff323a98d5f88f2897c93978511eaee46.tar.gz
ayatana-indicator-sound-1d95d42ff323a98d5f88f2897c93978511eaee46.tar.bz2
ayatana-indicator-sound-1d95d42ff323a98d5f88f2897c93978511eaee46.zip
Lock out some functions
Diffstat (limited to 'tests')
-rw-r--r--tests/indicator-fixture.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/indicator-fixture.h b/tests/indicator-fixture.h
index 2dcefa1..75ad0f6 100644
--- a/tests/indicator-fixture.h
+++ b/tests/indicator-fixture.h
@@ -98,6 +98,7 @@ class IndicatorFixture : public ::testing::Test
g_main_loop_unref(_loop);
}
+ private:
static void _changed_quit (GMenuModel * model, gint position, gint removed, gint added, GMainLoop * loop) {
g_debug("Got Menus");
g_main_loop_quit(loop);
@@ -109,6 +110,7 @@ class IndicatorFixture : public ::testing::Test
return G_SOURCE_CONTINUE;
}
+ protected:
void setMenu (const std::string& path) {
_menu.reset();
@@ -143,6 +145,7 @@ class IndicatorFixture : public ::testing::Test
}
+ private:
std::shared_ptr<GVariant> getMenuAttributeVal (int location, std::shared_ptr<GMenuModel>& menu, const std::string& attribute, std::shared_ptr<GVariant>& value) {
if (!(location < g_menu_model_get_n_items(menu.get()))) {
return nullptr;
@@ -173,9 +176,12 @@ class IndicatorFixture : public ::testing::Test
if (submenu == nullptr)
return nullptr;
+ g_menu_model_get_n_items(submenu.get());
+
return getMenuAttributeRecurse(menuLocation + 1, menuEnd, attribute, value, submenu);
}
+ protected:
bool expectMenuAttribute (const std::vector<int> menuLocation, const std::string& attribute, GVariant * value) {
auto varref = std::shared_ptr<GVariant>(g_variant_ref_sink(value), [](GVariant * varptr) {
if (varptr != nullptr)