~kgunn72/mir/dont-crash-when-shooting-invalid-surface

« back to all changes in this revision

Viewing changes to tests/unit-tests/graphics/test_buffer_properties.cpp

  • Committer: Tarmac
  • Author(s): Alan Griffiths, Alexandros Frantzis, Daniel van Vugt, Kevin DuBois, Christopher James Halse Rogers, chris.gagnon, Mathieu Trudel-Lapierre, Robert Carr, Automatic PS uploader, Kevin Gunn, Daniel d'Andrada, Christopher James Halse Rogers, Michael Terry, Brandon Schaefer, Timo Jyrinki, Mir Team, Andreas Pokorny
  • Date: 2013-12-20 11:11:22 UTC
  • mfrom: (1169.1.1 version-0.1.3)
  • Revision ID: tarmac-20131220111122-h503fd1fnq7pn9za
Latest upstream release: Mir 0.1.3 (r1298).

Approved by Alan Griffiths, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
TEST(buffer_properties, default_create)
28
28
{
29
29
    geom::Size size;
30
 
    geom::PixelFormat pixel_format{geom::PixelFormat::invalid};
 
30
    MirPixelFormat pixel_format{mir_pixel_format_invalid};
31
31
    mg::BufferUsage usage{mg::BufferUsage::undefined};
32
32
 
33
33
    mg::BufferProperties prop;
40
40
TEST(buffer_properties, custom_create)
41
41
{
42
42
    geom::Size size{66, 166};
43
 
    geom::PixelFormat pixel_format{geom::PixelFormat::abgr_8888};
 
43
    MirPixelFormat pixel_format{mir_pixel_format_abgr_8888};
44
44
    mg::BufferUsage usage{mg::BufferUsage::hardware};
45
45
 
46
46
    mg::BufferProperties prop{size, pixel_format, usage};
53
53
TEST(buffer_properties, equal_properties_test_equal)
54
54
{
55
55
    geom::Size size{66, 166};
56
 
    geom::PixelFormat pixel_format{geom::PixelFormat::abgr_8888};
 
56
    MirPixelFormat pixel_format{mir_pixel_format_abgr_8888};
57
57
    mg::BufferUsage usage{mg::BufferUsage::hardware};
58
58
 
59
59
    mg::BufferProperties prop0{size, pixel_format, usage};
73
73
        {geom::Width{67}, geom::Height{166}}
74
74
    };
75
75
 
76
 
    geom::PixelFormat pixel_format[2] =
 
76
    MirPixelFormat pixel_format[2] =
77
77
    {
78
 
        geom::PixelFormat::abgr_8888,
79
 
        geom::PixelFormat::bgr_888
 
78
        mir_pixel_format_abgr_8888,
 
79
        mir_pixel_format_bgr_888
80
80
    };
81
81
 
82
82
    mg::BufferUsage usage[2] =