~mterry/mir/session-for-surface

« back to all changes in this revision

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

  • Committer: Michael Terry
  • Date: 2013-07-12 16:28:09 UTC
  • mfrom: (832.1.17 trunk)
  • Revision ID: michael.terry@canonical.com-20130712162809-kee7ca52gd29izhk
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    mg::DisplayConfigurationOutputId{3},
32
32
    mg::DisplayConfigurationCardId{2},
33
33
    {
34
 
        {geom::Size{geom::Width{10}, geom::Height{20}}, 60.0},
35
 
        {geom::Size{geom::Width{10}, geom::Height{20}}, 59.0},
36
 
        {geom::Size{geom::Width{15}, geom::Height{20}}, 59.0}
 
34
        {geom::Size{10, 20}, 60.0},
 
35
        {geom::Size{10, 20}, 59.0},
 
36
        {geom::Size{15, 20}, 59.0}
37
37
    },
38
 
    geom::Size{geom::Width{10}, geom::Height{20}},
39
 
    true,
 
38
    geom::Size{10, 20},
 
39
    true,
 
40
    true,
 
41
    geom::Point(),
40
42
    2
41
43
};
42
44
 
44
46
 
45
47
TEST(DisplayConfiguration, mode_equality)
46
48
{
47
 
    geom::Size const size{geom::Width{10}, geom::Height{20}};
 
49
    geom::Size const size{10, 20};
48
50
    double const vrefresh{59.9};
49
51
 
50
52
    mg::DisplayConfigurationMode const mode1{size, vrefresh};
57
59
 
58
60
TEST(DisplayConfiguration, mode_inequality)
59
61
{
60
 
    geom::Size const size1{geom::Width{10}, geom::Height{20}};
61
 
    geom::Size const size2{geom::Width{10}, geom::Height{21}};
 
62
    geom::Size const size1{10, 20};
 
63
    geom::Size const size2{10, 21};
62
64
    double const vrefresh1{59.9};
63
65
    double const vrefresh2{60.0};
64
66
 
109
111
 
110
112
    std::vector<mg::DisplayConfigurationMode> const modes2
111
113
    {
112
 
        {geom::Size{geom::Width{10}, geom::Height{20}}, 60.0},
113
 
        {geom::Size{geom::Width{10}, geom::Height{20}}, 59.9},
114
 
        {geom::Size{geom::Width{15}, geom::Height{20}}, 59.0}
 
114
        {geom::Size{10, 20}, 60.0},
 
115
        {geom::Size{10, 20}, 59.9},
 
116
        {geom::Size{15, 20}, 59.0}
115
117
    };
116
118
    std::vector<mg::DisplayConfigurationMode> const modes3
117
119
    {
118
 
        {geom::Size{geom::Width{10}, geom::Height{20}}, 60.0},
119
 
        {geom::Size{geom::Width{10}, geom::Height{20}}, 59.0}
 
120
        {geom::Size{10, 20}, 60.0},
 
121
        {geom::Size{10, 20}, 59.0}
120
122
    };
121
123
 
122
124
    output2.modes = modes2;
135
137
    mg::DisplayConfigurationOutput const output1 = tmpl_output;
136
138
    mg::DisplayConfigurationOutput output2 = tmpl_output;
137
139
 
138
 
    geom::Size const physical_size2{geom::Width{11}, geom::Height{20}};
 
140
    geom::Size const physical_size2{11, 20};
139
141
 
140
142
    output2.physical_size_mm = physical_size2;
141
143