diff options
| -rw-r--r-- | hud/HudController.cpp | 2 | ||||
| -rw-r--r-- | tests/test_application_launcher_icon.cpp | 7 | ||||
| -rw-r--r-- | tests/test_desktop_application_subject.cpp | 7 | ||||
| -rw-r--r-- | tests/test_glib_dbus_server.cpp | 5 | ||||
| -rw-r--r-- | tests/test_gnome_session_manager.cpp | 7 | ||||
| -rw-r--r-- | tests/test_im_text_entry.cpp | 7 | ||||
| -rw-r--r-- | tests/test_launcher_hide_machine.cpp | 7 | ||||
| -rw-r--r-- | tests/test_launcher_hover_machine.cpp | 5 | ||||
| -rw-r--r-- | tests/test_launcher_icon.cpp | 7 | ||||
| -rw-r--r-- | tests/test_panel_menu_view.cpp | 7 | ||||
| -rw-r--r-- | tests/test_session_button.cpp | 9 | ||||
| -rw-r--r-- | tests/test_session_controller.cpp | 9 | ||||
| -rw-r--r-- | tests/test_software_center_launcher_icon.cpp | 7 | ||||
| -rw-r--r-- | tests/test_switcher_view.cpp | 6 |
14 files changed, 78 insertions, 14 deletions
diff --git a/hud/HudController.cpp b/hud/HudController.cpp index 3e858229b..65f6ae1fb 100644 --- a/hud/HudController.cpp +++ b/hud/HudController.cpp @@ -157,7 +157,7 @@ void Controller::SetupHudView() view_->search_activated.connect(sigc::mem_fun(this, &Controller::OnSearchActivated)); view_->query_activated.connect(sigc::mem_fun(this, &Controller::OnQueryActivated)); view_->query_selected.connect(sigc::mem_fun(this, &Controller::OnQuerySelected)); - view_->layout_changed.connect(sigc::bind(sigc::mem_fun(this, &Controller::Relayout), nullptr)); + view_->layout_changed.connect(sigc::bind(sigc::mem_fun(this, &Controller::Relayout), false)); // Add to the debug introspection. AddChild(view_); } diff --git a/tests/test_application_launcher_icon.cpp b/tests/test_application_launcher_icon.cpp index 3fc21543a..654240984 100644 --- a/tests/test_application_launcher_icon.cpp +++ b/tests/test_application_launcher_icon.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2012 Canonical Ltd. + * Copyright 2012,2015 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -1012,6 +1012,9 @@ struct QuitLabel : TestApplicationLauncherIcon, testing::WithParamInterface<std: virtual ~QuitLabel() {} }; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + INSTANTIATE_TEST_CASE_P(TestApplicationLauncherIcon, QuitLabel, testing::Values("Quit", "Exit", "Close")); TEST_P(/*TestApplicationLauncherIcon*/QuitLabel, QuicklistMenuItemRemoteOverridesQuitByLabelNotRunning) @@ -1059,6 +1062,8 @@ TEST_P(/*TestApplicationLauncherIcon*/QuitLabel, QuicklistMenuItemRemoteOverride EXPECT_TRUE(cb_called); } +#pragma GCC diagnostic pop + TEST_F(TestApplicationLauncherIcon, QuicklistMenuItemRemoteOverridesQuitByPropertyNotRunning) { mock_app->SetRunState(false); diff --git a/tests/test_desktop_application_subject.cpp b/tests/test_desktop_application_subject.cpp index 640fa6ae1..07270bf5c 100644 --- a/tests/test_desktop_application_subject.cpp +++ b/tests/test_desktop_application_subject.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2013 Canonical Ltd. + * Copyright 2013,2015 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -32,6 +32,9 @@ struct TestDestkopApplicationSubject : testing::Test ApplicationSubject subject; }; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + struct Property : TestDestkopApplicationSubject, testing::WithParamInterface<std::string> {}; INSTANTIATE_TEST_CASE_P(TestDestkopApplicationSubject, Property, testing::Values("Fooo", "Bar", "Unity")); @@ -275,4 +278,6 @@ TEST_P(/*TestDesktopApplicationSubject*/Property, CopyBaseTypeConstructor) EXPECT_EQ(mock_subject, copy_subject); } +#pragma GCC diagnostic pop + } // anonymous namespace diff --git a/tests/test_glib_dbus_server.cpp b/tests/test_glib_dbus_server.cpp index 6145e152f..b2f965fd0 100644 --- a/tests/test_glib_dbus_server.cpp +++ b/tests/test_glib_dbus_server.cpp @@ -433,6 +433,9 @@ TEST_F(TestGLibDBusServerInteractions, SignalWithParameterEmission) EXPECT_TRUE(signal_got); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + struct ReadableProperties : TestGLibDBusServerInteractions, testing::WithParamInterface<std::string> {}; INSTANTIATE_TEST_CASE_P(TestGLibDBusServerInteractions, ReadableProperties, testing::Values("ReadOnlyProperty", "ReadWriteProperty")); @@ -510,4 +513,6 @@ TEST_P(/*TestGLibDBusServerInteractions*/WritableProperties, PropertySetter) EXPECT_EQ(value, new_value); } +#pragma GCC diagnostic pop + } // Namespace diff --git a/tests/test_gnome_session_manager.cpp b/tests/test_gnome_session_manager.cpp index 15fa765f8..bcd63d090 100644 --- a/tests/test_gnome_session_manager.cpp +++ b/tests/test_gnome_session_manager.cpp @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* - * Copyright (C) 2013 Canonical Ltd + * Copyright (C) 2013,2015 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -709,6 +709,9 @@ TEST_F(TestGnomeSessionManager, LogoutRequested) EXPECT_TRUE(cancelled); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + struct InteractiveMode : TestGnomeSessionManager, testing::WithParamInterface<bool> {}; INSTANTIATE_TEST_CASE_P(TestGnomeSessionManager, InteractiveMode, testing::Bool()); @@ -921,6 +924,8 @@ TEST_P(/*TestGnomeSessionManager*/InteractiveMode, RebootRequestedInhibitors) EXPECT_FALSE(cancelled); } +#pragma GCC diagnostic pop + TEST_F(TestGnomeSessionManager, ImmediateReboot) { EnableInteractiveShutdown(false); diff --git a/tests/test_im_text_entry.cpp b/tests/test_im_text_entry.cpp index a0d6e9b52..f9a03dc87 100644 --- a/tests/test_im_text_entry.cpp +++ b/tests/test_im_text_entry.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 Canonical Ltd. + * Copyright 2012,2013,2015 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License version 3, as @@ -156,6 +156,9 @@ TEST_F(TestIMTextEntry, CtrlA) EXPECT_EQ(EventNativelyHandled(), text_entry.InspectKeyEvent(selectall)); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + struct CtrlKeybindings : TestIMTextEntry, testing::WithParamInterface<unsigned long> {}; INSTANTIATE_TEST_CASE_P(TestIMTextEntry, CtrlKeybindings, testing::Values(NUX_VK_a, NUX_VK_BACKSPACE, NUX_VK_LEFT, NUX_VK_RIGHT, @@ -168,6 +171,8 @@ TEST_P(/*TestIMTextEntry*/CtrlKeybindings, Handling) EXPECT_EQ(EventNativelyHandled(), text_entry.InspectKeyEvent(event)); } +#pragma GCC diagnostic pop + TEST_F(TestIMTextEntry, AltKeybindings) { for (unsigned long keysym = 0; keysym < XK_umacron; ++keysym) diff --git a/tests/test_launcher_hide_machine.cpp b/tests/test_launcher_hide_machine.cpp index fc5c349b0..41adc7b66 100644 --- a/tests/test_launcher_hide_machine.cpp +++ b/tests/test_launcher_hide_machine.cpp @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* - * Copyright (C) 2012 Canonical Ltd + * Copyright (C) 2012,2015 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -48,6 +48,9 @@ struct HideModeNever : public TestWithParam<std::tuple<ul::LauncherHideMachine:: ul::LauncherHideMachine machine; }; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + TEST_P(HideModeNever, Bool2Bool) { auto quirk = std::tr1::get<0>(GetParam()); bool initial_value = std::tr1::get<1>(GetParam()); @@ -70,6 +73,8 @@ TEST_P(HideModeNever, Bool2Bool) { INSTANTIATE_TEST_CASE_P(TestLauncherHideMachine, HideModeNever, Combine(ValuesIn(QUIRKS), Bool(), Bool())); +#pragma GCC diagnostic pop + // TODO: write tests for HideModeAutohide. } diff --git a/tests/test_launcher_hover_machine.cpp b/tests/test_launcher_hover_machine.cpp index 4badad14e..fb3939e3e 100644 --- a/tests/test_launcher_hover_machine.cpp +++ b/tests/test_launcher_hover_machine.cpp @@ -32,6 +32,9 @@ unity::LauncherHoverMachine::HoverQuirk QUIRKS [] { unity::LauncherHoverMachine::KEY_NAV_ACTIVE, unity::LauncherHoverMachine::LAUNCHER_IN_ACTION }; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + struct SingleQuirk : public TestWithParam<std::tuple<unity::LauncherHoverMachine::HoverQuirk, bool, bool>> { unity::LauncherHoverMachine machine; }; @@ -113,3 +116,5 @@ INSTANTIATE_TEST_CASE_P(TestLauncherHoverMachine, MultipleQuirks, Combine(ValuesIn(QUIRKS), Bool(), Bool(), ValuesIn(QUIRKS), Bool(), Bool())); } + +#pragma GCC diagnostic pop diff --git a/tests/test_launcher_icon.cpp b/tests/test_launcher_icon.cpp index c7ba66ed4..d7b8abc42 100644 --- a/tests/test_launcher_icon.cpp +++ b/tests/test_launcher_icon.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 Canonical Ltd. + * Copyright 2012,2013,2015 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -96,6 +96,9 @@ std::vector<AbstractLauncherIcon::Quirk> GetQuirks() return quirks; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + struct Quirks : TestLauncherIcon, WithParamInterface<AbstractLauncherIcon::Quirk> {}; INSTANTIATE_TEST_CASE_P(TestLauncherIcon, Quirks, ValuesIn(GetQuirks())); @@ -285,6 +288,8 @@ TEST_P(/*TestLauncherIcon*/Quirks, SetQuirkDurationAllMonitors) } } +#pragma GCC diagnostic pop + TEST_F(TestLauncherIcon, NeedRedrawInvisibleAllMonitors) { AbstractLauncherIcon::Ptr icon_ptr(new NiceMock<MockLauncherIcon>()); diff --git a/tests/test_panel_menu_view.cpp b/tests/test_panel_menu_view.cpp index 27738ac6b..138701f75 100644 --- a/tests/test_panel_menu_view.cpp +++ b/tests/test_panel_menu_view.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2012 Canonical Ltd. + * Copyright 2012,2015 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -145,6 +145,9 @@ TEST_F(TestPanelMenuView, ShouldDrawMenusOnSpread) EXPECT_FALSE(menu_view.ShouldDrawMenus()); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + struct ProgressTester : TestPanelMenuView, WithParamInterface<double> {}; INSTANTIATE_TEST_CASE_P(TestPanelMenuView, ProgressTester, Range(0.0, 1.0, 0.1)); @@ -185,5 +188,7 @@ TEST_P(ProgressTester, RestoreOnGrabInBiggerWorkArea) EXPECT_EQ(max_window->geo(), expected_geo); } +#pragma GCC diagnostic pop + } // panel namespace } // unity namespace diff --git a/tests/test_session_button.cpp b/tests/test_session_button.cpp index 67e28d496..32b4d61d7 100644 --- a/tests/test_session_button.cpp +++ b/tests/test_session_button.cpp @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* - * Copyright (C) 2013 Canonical Ltd + * Copyright (C) 2013,2015 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -151,6 +151,9 @@ struct ActionButton : public testing::TestWithParam<Button::Action> { Button button; }; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + INSTANTIATE_TEST_CASE_P(TestSessionButtonTypes, ActionButton, testing::Values(Button::Action::LOCK, Button::Action::LOGOUT, Button::Action::SUSPEND, Button::Action::HIBERNATE, Button::Action::SHUTDOWN, Button::Action::REBOOT)); @@ -165,5 +168,7 @@ TEST_P(/*TestSessionButtonTypes*/ActionButton, Action) EXPECT_EQ(button.action(), GetParam()); } +#pragma GCC diagnostic pop + } // session -} // unity \ No newline at end of file +} // unity diff --git a/tests/test_session_controller.cpp b/tests/test_session_controller.cpp index bd693a774..d80ec8555 100644 --- a/tests/test_session_controller.cpp +++ b/tests/test_session_controller.cpp @@ -1,6 +1,6 @@ // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- /* - * Copyright (C) 2013 Canonical Ltd + * Copyright (C) 2013,2015 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -73,6 +73,9 @@ TEST_F(TestSessionController, DisconnectWMSignalsOnDestruction) color_property.changed.emit(nux::color::RandomColor()); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + struct ShowMode : TestSessionController, testing::WithParamInterface<View::Mode> {}; INSTANTIATE_TEST_CASE_P(TestSessionController, ShowMode, testing::Values(View::Mode::SHUTDOWN, View::Mode::LOGOUT, View::Mode::FULL)); @@ -137,6 +140,8 @@ TEST_P(/*TestSessionController*/Inhibited, LogoutRequested) EXPECT_EQ(controller.view_->have_inhibitors(), GetParam()); } +#pragma GCC diagnostic pop + TEST_F(TestSessionController, CancelRequested) { controller.Show(View::Mode::FULL); @@ -182,4 +187,4 @@ TEST_F(TestSessionController, HidesAndCancelOnClickOutside) } } // session -} // unity \ No newline at end of file +} // unity diff --git a/tests/test_software_center_launcher_icon.cpp b/tests/test_software_center_launcher_icon.cpp index f8bfe3f05..abf65d09f 100644 --- a/tests/test_software_center_launcher_icon.cpp +++ b/tests/test_software_center_launcher_icon.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2012 Canonical Ltd. + * Copyright 2012,2015 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -243,6 +243,9 @@ TEST_F(TestSoftwareCenterLauncherIcon, AnimateFromInvalidPosition) EXPECT_EQ(PRE_INSTALL_ICON, icon.icon_name()); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" + struct MultiMonitor : TestSoftwareCenterLauncherIcon, WithParamInterface<unsigned> {}; INSTANTIATE_TEST_CASE_P(TestSoftwareCenterLauncherIcon, MultiMonitor, Range<unsigned>(0, monitors::MAX, 1)); @@ -292,6 +295,8 @@ TEST_P(/*TestSoftwareCenterLauncherIcon*/InstallProgress, InstallEmblems) g_variant_unref(params); } +#pragma GCC diagnostic pop + } } diff --git a/tests/test_switcher_view.cpp b/tests/test_switcher_view.cpp index 0bce83b97..2ce9926b3 100644 --- a/tests/test_switcher_view.cpp +++ b/tests/test_switcher_view.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2013 Canonical Ltd. + * Copyright 2013,2015 Canonical Ltd. * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published @@ -150,6 +150,8 @@ TEST_F(TestSwitcherView, SkipAnimation) EXPECT_DOUBLE_EQ(switcher.GetCurrentProgress(), 1.0f); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" struct AnimationProgress : TestSwitcherView, testing::WithParamInterface<float> {}; INSTANTIATE_TEST_CASE_P(TestSwitcherView, AnimationProgress, testing::Range<float>(0.0, 1.0, 0.1)); @@ -216,5 +218,7 @@ TEST_P(AnimationProgress, ResizeRenderTargets) } } +#pragma GCC diagnostic pop + } } |
