~ubuntu-branches/ubuntu/utopic/mir/utopic-proposed

« back to all changes in this revision

Viewing changes to tests/unit-tests/graphics/mesa/test_buffer_allocator.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-03-10 19:28:46 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: package-import@ubuntu.com-20140310192846-rq9qm3ec26yrelo2
Tags: upstream-0.1.6+14.04.20140310
ImportĀ upstreamĀ versionĀ 0.1.6+14.04.20140310

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "mir_test_doubles/mock_buffer_initializer.h"
29
29
#include "mir_test_doubles/null_virtual_terminal.h"
30
30
#include "mir_test_framework/udev_environment.h"
31
 
#include "mir/graphics/null_display_report.h"
 
31
#include "src/server/report/null_report_factory.h"
32
32
 
33
33
#include <cstdlib>
34
34
#include <memory>
43
43
namespace mgm = mir::graphics::mesa;
44
44
namespace geom = mir::geometry;
45
45
namespace mtd = mir::test::doubles;
 
46
namespace mr = mir::report;
46
47
namespace mtf = mir::mir_test_framework;
47
48
 
48
49
class MesaBufferAllocatorTest  : public ::testing::Test
53
54
        using namespace testing;
54
55
        unsetenv("MIR_BYPASS");
55
56
 
56
 
        fake_devices.add_standard_drm_devices();
 
57
        fake_devices.add_standard_device("standard-drm-devices");
57
58
 
58
59
        size = geom::Size{300, 200};
59
60
        pf = mir_pixel_format_argb_8888;
64
65
        .WillByDefault(Return(mock_gbm.fake_gbm.bo_handle));
65
66
 
66
67
        platform = std::make_shared<mgm::Platform>(
67
 
            std::make_shared<mg::NullDisplayReport>(),
 
68
            mr::null_display_report(),
68
69
            std::make_shared<mtd::NullVirtualTerminal>());
69
70
        mock_buffer_initializer = std::make_shared<testing::NiceMock<mtd::MockBufferInitializer>>();
70
71
        allocator.reset(new mgm::BufferAllocator(platform->gbm.device, mock_buffer_initializer));