Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
display_config_matchers.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Kevin DuBois <kevin.dubois@canonical.com>
17  */
18 
19 #ifndef MIR_TEST_DISPLAY_CONFIG_MATCHERS_H_
20 #define MIR_TEST_DISPLAY_CONFIG_MATCHERS_H_
21 
23 
24 #include <gmock/gmock.h>
25 
26 //avoid a valgrind complaint by defining printer for this type
27 static void PrintTo(MirDisplayConfiguration const&, ::std::ostream*) __attribute__ ((unused));
28 void PrintTo(MirDisplayConfiguration const&, ::std::ostream*)
29 {
30 }
31 
32 namespace mir
33 {
34 namespace protobuf
35 {
36 
37 class DisplayConfiguration;
38 class Connection;
39 static void PrintTo(mir::protobuf::DisplayConfiguration const&, ::std::ostream*) __attribute__ ((unused));
40 void PrintTo(mir::protobuf::DisplayConfiguration const&, ::std::ostream*) {}
41 
42 static void PrintTo(mir::protobuf::Connection const&, ::std::ostream*) __attribute__ ((unused));
43 void PrintTo(mir::protobuf::Connection const&, ::std::ostream*)
44 {
45 }
46 
47 }
48 
49 namespace graphics
50 {
51 class DisplayConfiguration;
52 }
53 
54 namespace test
55 {
56 
57 bool compare_display_configurations(graphics::DisplayConfiguration const& display_config1,
58  graphics::DisplayConfiguration const& display_config2);
59 
61  graphics::DisplayConfiguration const& display_config);
62 
63 bool compare_display_configurations(protobuf::DisplayConfiguration const& protobuf_config,
64  graphics::DisplayConfiguration const& display_config);
65 
67  protobuf::DisplayConfiguration const& protobuf_config);
68 
69 MATCHER_P(DisplayConfigMatches, config, "")
70 {
71  return compare_display_configurations(arg, config);
72 }
73 
74 }
75 }
76 
77 #endif /* MIR_TEST_DISPLAY_CONFIG_MATCHERS_H_ */
Definition: client_types.h:252
bool compare_display_configurations(graphics::DisplayConfiguration const &display_config1, graphics::DisplayConfiguration const &display_config2)
__attribute__((__deprecated__("Use mir_connection_create_display_config()"))) void mir_connection_get_display_info(MirConnection *connection
MATCHER_P(KeyOfSymbol, keysym,"")
Definition: client_event_matchers.h:40

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014