Mir

Merge lp:~robertcarr/mir/i-love-deduping-mocks into lp:~mir-team/mir/trunk

Proposed by Robert Carr
Status: Rejected
Rejected by: Robert Carr
Proposed branch: lp:~robertcarr/mir/i-love-deduping-mocks
Merge into: lp:~mir-team/mir/trunk
Diff against target: 36 lines (+2/-10)
1 file modified
tests/acceptance-tests/test_focus_management_api.cpp (+2/-10)
To merge this branch: bzr merge lp:~robertcarr/mir/i-love-deduping-mocks
Reviewer Review Type Date Requested Status
Alan Griffiths Needs Fixing
Daniel van Vugt Needs Information
Kevin DuBois (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+156636@code.launchpad.net

Commit message

Dedupe mock usage in test_focus_management_api.cpp

Description of the change

Dedupe mock usage in test_focus_management_api.cpp

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Kevin DuBois (kdub) wrote :

seems ok

Revision history for this message
Kevin DuBois (kdub) :
review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Du-duplication is awesome, but the result is confusing:

class MockShell : public mtd::MockShell

Two MockShell classes?

review: Needs Information
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> Du-duplication is awesome, but the result is confusing:
>
> class MockShell : public mtd::MockShell
>
> Two MockShell classes?

I'm not entirely convinced by Robert's mission to remove all duplication (see link below) and this is a case too confusing.

http://programmer.97things.oreilly.com/wiki/index.php/Beware_the_Share

review: Needs Fixing

Unmerged revisions

552. By Robert Carr

Dedupe MockShell in test_focus_management_api.cpp

551. By Alan Griffiths

mir_toolkit: replace mir_toolkit namespace with a Doxygen group. Fixes: https://bugs.launchpad.net/bugs/1137170.

Approved by PS Jenkins bot, Kevin DuBois, Alexandros Frantzis.

550. By Alan Griffiths

examples: Add Doxygen markup to render_surfaces.cpp.

Approved by PS Jenkins bot, Robert Carr, Alexandros Frantzis.

549. By Robert Carr

Five minutes of doxygen comments.

Approved by Kevin DuBois, PS Jenkins bot.

548. By Kevin DuBois

MirNativeWindow is the code that allows us to communicate buffers to the driver on android. Currently, we're just using this in our clients so they can use the buffers that they get over ipc, but we will need this code for our own fb native window type (to deprecate 3rd_party/android-fbtype) and for inprocess-egl work on the android side.

Approved by Alexandros Frantzis, PS Jenkins bot.

547. By Alan Griffiths

legion: trim trailing whitespace.

Approved by PS Jenkins bot, Kevin DuBois.

546. By Alan Griffiths

logging, config: Add a glog based logging option.

Approved by PS Jenkins bot, Alexandros Frantzis, Kevin DuBois.

545. By Alan Griffiths

examples, test: reuse run_mir() for managing DisplayServer invocation.

Approved by Kevin DuBois, Alexandros Frantzis, PS Jenkins bot.

544. By Daniel van Vugt

Remove dead code ("binder" support) (LP: #1160741). Fixes: https://bugs.launchpad.net/bugs/1160741.

Approved by Alan Griffiths, PS Jenkins bot.

543. By Kevin DuBois

add classes for supporting for HWC 1.1 device (nexus4).

Approved by Alan Griffiths, Alexandros Frantzis, Robert Ancell, PS Jenkins bot.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/acceptance-tests/test_focus_management_api.cpp'
2--- tests/acceptance-tests/test_focus_management_api.cpp 2013-03-22 10:34:16 +0000
3+++ tests/acceptance-tests/test_focus_management_api.cpp 2013-04-02 16:58:40 +0000
4@@ -23,6 +23,7 @@
5 #include "mir/frontend/shell.h"
6
7 #include "mir_test_doubles/mock_display.h"
8+#include "mir_test_doubles/mock_shell.h"
9 #include "mir_test_framework/display_server_test_fixture.h"
10
11 #include <gtest/gtest.h>
12@@ -118,7 +119,7 @@
13 }
14 };
15
16-class MockShell : public frontend::Shell
17+class MockShell : public mtd::MockShell
18 {
19 public:
20 MockShell(std::shared_ptr<Shell> const& impl) :
21@@ -137,15 +138,6 @@
22 ON_CALL(*this, shutdown()).WillByDefault(Invoke(impl.get(), &Shell::shutdown));
23 }
24
25- MOCK_METHOD1(open_session, std::shared_ptr<mf::Session> (std::string const& name));
26- MOCK_METHOD1(close_session, void (std::shared_ptr<mf::Session> const& session));
27-
28- MOCK_METHOD2(tag_session_with_lightdm_id, void (std::shared_ptr<mf::Session> const& session, int id));
29- MOCK_METHOD1(focus_session_with_lightdm_id, void (int id));
30-
31- MOCK_METHOD2(create_surface_for, frontend::SurfaceId(std::shared_ptr<mf::Session> const&, mf::SurfaceCreationParameters const&));
32- MOCK_METHOD0(shutdown, void ());
33-
34 private:
35 std::shared_ptr<frontend::Shell> const impl;
36 };

Subscribers

People subscribed via source and target branches