~ubuntu-branches/ubuntu/wily/mir/wily-proposed

« back to all changes in this revision

Viewing changes to tests/integration-tests/test_drm_auth_magic.cpp

  • Committer: Package Import Robot
  • Author(s): CI Train Bot
  • Date: 2015-05-12 13:12:55 UTC
  • mto: This revision was merged to the branch mainline in revision 96.
  • Revision ID: package-import@ubuntu.com-20150512131255-y7z12i8n4pbvo70x
Tags: upstream-0.13.0+15.10.20150512
ImportĀ upstreamĀ versionĀ 0.13.0+15.10.20150512

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#include <gmock/gmock.h>
36
36
#include <gtest/gtest.h>
37
37
 
 
38
#include <cstring>
 
39
 
38
40
namespace mg = mir::graphics;
39
41
namespace mc = mir::compositor;
40
42
namespace geom = mir::geometry;
89
91
 
90
92
}
91
93
 
 
94
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
 
95
 
92
96
TEST_F(BespokeDisplayServerTestFixture, client_drm_auth_magic_calls_platform)
93
97
{
94
98
    static unsigned int const magic{0x10111213};
102
106
            if (!platform)
103
107
            {
104
108
                mg::PlatformOperationMessage pkg;
105
 
                pkg.data.resize(sizeof(MirMesaAuthMagicResponse));
106
 
                *(reinterpret_cast<MirMesaAuthMagicResponse*>(pkg.data.data())) =
107
 
                    auth_magic_response;
 
109
                pkg.data.resize(sizeof(auth_magic_response));
 
110
                std::memcpy(pkg.data.data(), &auth_magic_response,
 
111
                            sizeof(auth_magic_response));
108
112
 
109
113
                auto ipc_ops = std::make_shared<NiceMock<MockAuthenticatingIpcOps>>();
110
114
                EXPECT_CALL(*ipc_ops, platform_operation(_,_))