Merge lp:~alan-griffiths/miral/fix-FTBFS-on-Xenial-with-Mir-0.27 into lp:miral

Proposed by Alan Griffiths
Status: Merged
Approved by: Gerry Boland
Approved revision: 574
Merged at revision: 572
Proposed branch: lp:~alan-griffiths/miral/fix-FTBFS-on-Xenial-with-Mir-0.27
Merge into: lp:miral
Diff against target: 86 lines (+12/-12)
1 file modified
test/drag_and_drop.cpp (+12/-12)
To merge this branch: bzr merge lp:~alan-griffiths/miral/fix-FTBFS-on-Xenial-with-Mir-0.27
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Mir CI Bot continuous-integration Approve
Review via email: mp+328309@code.launchpad.net

Commit message

Fix FTBFS with GMock 1.7 matchers (when compiling against Mir 0.27)

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:574
https://mir-jenkins.ubuntu.com/job/miral-ci/59/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-miral/92
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5016
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5005
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5005
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5005
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-miral/arch=amd64,release=artful/96
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-miral/arch=amd64,release=artful/96/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-miral/arch=amd64,release=xenial/96
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-miral/arch=amd64,release=xenial/96/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-miral/arch=amd64,release=zesty/96
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-miral/arch=amd64,release=zesty/96/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-miral/arch=i386,release=artful/96
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-miral/arch=i386,release=artful/96/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-miral/arch=i386,release=xenial/96
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-miral/arch=i386,release=xenial/96/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-miral/arch=i386,release=zesty/96
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-miral/arch=i386,release=zesty/96/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/miral-ci/59/rebuild

review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

Compiles ok!

Nitpicking: EXPECT_THAT(cookie, Ne(nullptr)) could be EXPECT_NE(nullptr, cookie);
(Google also seems to want the expected value to be first)

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

> Compiles ok!
>
> Nitpicking: EXPECT_THAT(cookie, Ne(nullptr)) could be EXPECT_NE(nullptr,
> cookie);
> (Google also seems to want the expected value to be first)

I think "EXPECT_THAT(cookie, Ne(nullptr))" reads better than "EXPECT_NE(nullptr, cookie)"

Revision history for this message
Gerry Boland (gerboland) wrote :

Not worth arguing about :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'test/drag_and_drop.cpp'
2--- test/drag_and_drop.cpp 2017-07-17 14:50:30 +0000
3+++ test/drag_and_drop.cpp 2017-07-31 14:11:51 +0000
4@@ -579,71 +579,71 @@
5 {
6 auto const cookie = user_initiates_drag();
7
8- EXPECT_THAT(cookie, NotNull());
9+ EXPECT_THAT(cookie, Ne(nullptr));
10 }
11
12 TEST_F(DragAndDrop, when_client_requests_drags_it_receives_handle)
13 {
14 auto const cookie = user_initiates_drag();
15- ASSERT_THAT(cookie, NotNull());
16+ ASSERT_THAT(cookie, Ne(nullptr));
17
18 auto const handle = client_requests_drag(cookie);
19
20- EXPECT_THAT(handle, NotNull());
21+ EXPECT_THAT(handle, Ne(nullptr));
22 }
23
24 TEST_F(DragAndDrop, during_drag_when_user_moves_mouse_client_receives_handle)
25 {
26 auto const cookie = user_initiates_drag();
27- ASSERT_THAT(cookie, NotNull());
28+ ASSERT_THAT(cookie, Ne(nullptr));
29 auto const handle_from_request = client_requests_drag(cookie);
30
31 auto const handle = handle_from_mouse_move();
32
33- EXPECT_THAT(handle, NotNull());
34+ EXPECT_THAT(handle, Ne(nullptr));
35 EXPECT_THAT(handle, BlobContentEq(handle_from_request));
36 }
37
38 TEST_F(DragAndDrop, when_drag_moves_from_window_leave_event_contains_handle)
39 {
40 auto const cookie = user_initiates_drag();
41- ASSERT_THAT(cookie, NotNull());
42+ ASSERT_THAT(cookie, Ne(nullptr));
43 auto const handle_from_request = client_requests_drag(cookie);
44
45 auto const handle = handle_from_mouse_leave();
46
47- EXPECT_THAT(handle, NotNull());
48+ EXPECT_THAT(handle, Ne(nullptr));
49 EXPECT_THAT(handle, BlobContentEq(handle_from_request));
50 }
51
52 TEST_F(DragAndDrop, when_drag_enters_target_window_enter_event_contains_handle)
53 {
54 auto const cookie = user_initiates_drag();
55- ASSERT_THAT(cookie, NotNull());
56+ ASSERT_THAT(cookie, Ne(nullptr));
57 auto const handle_from_request = client_requests_drag(cookie);
58
59 auto const handle = handle_from_mouse_enter();
60
61- EXPECT_THAT(handle, NotNull());
62+ EXPECT_THAT(handle, Ne(nullptr));
63 EXPECT_THAT(handle, BlobContentEq(handle_from_request));
64 }
65
66 TEST_F(DragAndDrop, when_drag_releases_target_window_release_event_contains_handle)
67 {
68 auto const cookie = user_initiates_drag();
69- ASSERT_THAT(cookie, NotNull());
70+ ASSERT_THAT(cookie, Ne(nullptr));
71 auto const handle_from_request = client_requests_drag(cookie);
72
73 auto const handle = handle_from_mouse_release();
74
75- EXPECT_THAT(handle, NotNull());
76+ EXPECT_THAT(handle, Ne(nullptr));
77 EXPECT_THAT(handle, BlobContentEq(handle_from_request));
78 }
79
80 TEST_F(DragAndDrop, after_drag_finishes_pointer_events_no_longer_contain_handle)
81 {
82 auto const cookie = user_initiates_drag();
83- ASSERT_THAT(cookie, NotNull());
84+ ASSERT_THAT(cookie, Ne(nullptr));
85 client_requests_drag(cookie);
86 handle_from_mouse_release();
87

Subscribers

People subscribed via source and target branches