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

« back to all changes in this revision

Viewing changes to tests/unit-tests/graphics/test_graphics_platform.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:
35
35
#include "mir/logging/dumb_console_logger.h"
36
36
#include "mir/options/program_option.h"
37
37
 
38
 
#include "mir/graphics/null_display_report.h"
 
38
#include "src/server/report/null_report_factory.h"
39
39
 
40
40
#include <gtest/gtest.h>
41
41
 
43
43
namespace ml = mir::logging;
44
44
namespace geom = mir::geometry;
45
45
namespace mtd = mir::test::doubles;
 
46
namespace mr = mir::report;
46
47
namespace mo = mir::options;
47
48
#ifndef ANDROID
48
49
namespace mtf = mir::mir_test_framework;
66
67
        ON_CALL(mock_gbm, gbm_bo_get_format(_))
67
68
        .WillByDefault(Return(GBM_FORMAT_ARGB8888));
68
69
 
69
 
        typedef mtd::MockEGL::generic_function_pointer_t func_ptr_t;
70
 
 
71
 
        ON_CALL(mock_egl, eglGetProcAddress(StrEq("eglCreateImageKHR")))
72
 
            .WillByDefault(Return(reinterpret_cast<func_ptr_t>(eglCreateImageKHR)));
73
 
        ON_CALL(mock_egl, eglGetProcAddress(StrEq("eglDestroyImageKHR")))
74
 
            .WillByDefault(Return(reinterpret_cast<func_ptr_t>(eglDestroyImageKHR)));
75
 
        ON_CALL(mock_egl, eglGetProcAddress(StrEq("glEGLImageTargetTexture2DOES")))
76
 
            .WillByDefault(Return(reinterpret_cast<func_ptr_t>(glEGLImageTargetTexture2DOES)));
77
 
 
78
 
        fake_devices.add_standard_drm_devices();
 
70
        fake_devices.add_standard_device("standard-drm-devices");
79
71
#endif
80
72
    }
81
73
 
82
74
    std::shared_ptr<mg::Platform> create_platform()
83
75
    {
84
76
#ifdef ANDROID
85
 
        return mg::create_platform(std::make_shared<mo::ProgramOption>(), std::make_shared<mg::NullDisplayReport>());
 
77
        return mg::create_platform(std::make_shared<mo::ProgramOption>(), mr::null_display_report());
86
78
#else
87
79
        return std::make_shared<mg::mesa::Platform>(
88
 
            std::make_shared<mg::NullDisplayReport>(),
 
80
            mr::null_display_report(),
89
81
            std::make_shared<mir::test::doubles::NullVirtualTerminal>());
90
82
#endif
91
83
    }