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
=== modified file 'test/drag_and_drop.cpp'
--- test/drag_and_drop.cpp 2017-07-17 14:50:30 +0000
+++ test/drag_and_drop.cpp 2017-07-31 14:11:51 +0000
@@ -579,71 +579,71 @@
579{579{
580 auto const cookie = user_initiates_drag();580 auto const cookie = user_initiates_drag();
581581
582 EXPECT_THAT(cookie, NotNull());582 EXPECT_THAT(cookie, Ne(nullptr));
583}583}
584584
585TEST_F(DragAndDrop, when_client_requests_drags_it_receives_handle)585TEST_F(DragAndDrop, when_client_requests_drags_it_receives_handle)
586{586{
587 auto const cookie = user_initiates_drag();587 auto const cookie = user_initiates_drag();
588 ASSERT_THAT(cookie, NotNull());588 ASSERT_THAT(cookie, Ne(nullptr));
589589
590 auto const handle = client_requests_drag(cookie);590 auto const handle = client_requests_drag(cookie);
591591
592 EXPECT_THAT(handle, NotNull());592 EXPECT_THAT(handle, Ne(nullptr));
593}593}
594594
595TEST_F(DragAndDrop, during_drag_when_user_moves_mouse_client_receives_handle)595TEST_F(DragAndDrop, during_drag_when_user_moves_mouse_client_receives_handle)
596{596{
597 auto const cookie = user_initiates_drag();597 auto const cookie = user_initiates_drag();
598 ASSERT_THAT(cookie, NotNull());598 ASSERT_THAT(cookie, Ne(nullptr));
599 auto const handle_from_request = client_requests_drag(cookie);599 auto const handle_from_request = client_requests_drag(cookie);
600600
601 auto const handle = handle_from_mouse_move();601 auto const handle = handle_from_mouse_move();
602602
603 EXPECT_THAT(handle, NotNull());603 EXPECT_THAT(handle, Ne(nullptr));
604 EXPECT_THAT(handle, BlobContentEq(handle_from_request));604 EXPECT_THAT(handle, BlobContentEq(handle_from_request));
605}605}
606606
607TEST_F(DragAndDrop, when_drag_moves_from_window_leave_event_contains_handle)607TEST_F(DragAndDrop, when_drag_moves_from_window_leave_event_contains_handle)
608{608{
609 auto const cookie = user_initiates_drag();609 auto const cookie = user_initiates_drag();
610 ASSERT_THAT(cookie, NotNull());610 ASSERT_THAT(cookie, Ne(nullptr));
611 auto const handle_from_request = client_requests_drag(cookie);611 auto const handle_from_request = client_requests_drag(cookie);
612612
613 auto const handle = handle_from_mouse_leave();613 auto const handle = handle_from_mouse_leave();
614614
615 EXPECT_THAT(handle, NotNull());615 EXPECT_THAT(handle, Ne(nullptr));
616 EXPECT_THAT(handle, BlobContentEq(handle_from_request));616 EXPECT_THAT(handle, BlobContentEq(handle_from_request));
617}617}
618618
619TEST_F(DragAndDrop, when_drag_enters_target_window_enter_event_contains_handle)619TEST_F(DragAndDrop, when_drag_enters_target_window_enter_event_contains_handle)
620{620{
621 auto const cookie = user_initiates_drag();621 auto const cookie = user_initiates_drag();
622 ASSERT_THAT(cookie, NotNull());622 ASSERT_THAT(cookie, Ne(nullptr));
623 auto const handle_from_request = client_requests_drag(cookie);623 auto const handle_from_request = client_requests_drag(cookie);
624624
625 auto const handle = handle_from_mouse_enter();625 auto const handle = handle_from_mouse_enter();
626626
627 EXPECT_THAT(handle, NotNull());627 EXPECT_THAT(handle, Ne(nullptr));
628 EXPECT_THAT(handle, BlobContentEq(handle_from_request));628 EXPECT_THAT(handle, BlobContentEq(handle_from_request));
629}629}
630630
631TEST_F(DragAndDrop, when_drag_releases_target_window_release_event_contains_handle)631TEST_F(DragAndDrop, when_drag_releases_target_window_release_event_contains_handle)
632{632{
633 auto const cookie = user_initiates_drag();633 auto const cookie = user_initiates_drag();
634 ASSERT_THAT(cookie, NotNull());634 ASSERT_THAT(cookie, Ne(nullptr));
635 auto const handle_from_request = client_requests_drag(cookie);635 auto const handle_from_request = client_requests_drag(cookie);
636636
637 auto const handle = handle_from_mouse_release();637 auto const handle = handle_from_mouse_release();
638638
639 EXPECT_THAT(handle, NotNull());639 EXPECT_THAT(handle, Ne(nullptr));
640 EXPECT_THAT(handle, BlobContentEq(handle_from_request));640 EXPECT_THAT(handle, BlobContentEq(handle_from_request));
641}641}
642642
643TEST_F(DragAndDrop, after_drag_finishes_pointer_events_no_longer_contain_handle)643TEST_F(DragAndDrop, after_drag_finishes_pointer_events_no_longer_contain_handle)
644{644{
645 auto const cookie = user_initiates_drag();645 auto const cookie = user_initiates_drag();
646 ASSERT_THAT(cookie, NotNull());646 ASSERT_THAT(cookie, Ne(nullptr));
647 client_requests_drag(cookie);647 client_requests_drag(cookie);
648 handle_from_mouse_release();648 handle_from_mouse_release();
649649

Subscribers

People subscribed via source and target branches