Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: dbus/object_path.h

Issue 13942004: Adding PrintTo of ObjectPath for gtest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dbus/object_path.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DBUS_OBJECT_PATH_H_ 5 #ifndef DBUS_OBJECT_PATH_H_
6 #define DBUS_OBJECT_PATH_H_ 6 #define DBUS_OBJECT_PATH_H_
7 7
8 #include <iosfwd>
8 #include <string> 9 #include <string>
9 10
10 #include "dbus/dbus_export.h" 11 #include "dbus/dbus_export.h"
11 12
12 namespace dbus { 13 namespace dbus {
13 14
14 // ObjectPath is a type used to distinguish D-Bus object paths from simple 15 // ObjectPath is a type used to distinguish D-Bus object paths from simple
15 // strings, especially since normal practice is that these should be only 16 // strings, especially since normal practice is that these should be only
16 // initialized from static constants or obtained from remote objects and no 17 // initialized from static constants or obtained from remote objects and no
17 // assumptions about their value made. 18 // assumptions about their value made.
(...skipping 21 matching lines...) Expand all
39 40
40 // Permit testing for equality, required for mocks to work and useful for 41 // Permit testing for equality, required for mocks to work and useful for
41 // observers. 42 // observers.
42 bool operator==(const ObjectPath&) const; 43 bool operator==(const ObjectPath&) const;
43 bool operator!=(const ObjectPath&) const; 44 bool operator!=(const ObjectPath&) const;
44 45
45 private: 46 private:
46 std::string value_; 47 std::string value_;
47 }; 48 };
48 49
50 // This is required by gtest to print a readable output on test failures.
51 CHROME_DBUS_EXPORT void PrintTo(const ObjectPath& path, std::ostream* out);
52
49 } // namespace dbus 53 } // namespace dbus
50 54
51 #endif // DBUS_OBJECT_PATH_H_ 55 #endif // DBUS_OBJECT_PATH_H_
OLDNEW
« no previous file with comments | « no previous file | dbus/object_path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698