diff options
Diffstat (limited to 'dbus')
-rw-r--r-- | dbus/object_path.cc | 6 | ||||
-rw-r--r-- | dbus/object_path.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/dbus/object_path.cc b/dbus/object_path.cc index 1200a9b..8606b6b 100644 --- a/dbus/object_path.cc +++ b/dbus/object_path.cc @@ -4,6 +4,8 @@ #include "dbus/object_path.h" +#include <ostream> + #include "dbus/string_util.h" namespace dbus { @@ -24,4 +26,8 @@ bool ObjectPath::operator!=(const ObjectPath& that) const { return value_ != that.value_; } +void PrintTo(const ObjectPath& path, std::ostream* out) { + *out << path.value(); +} + } // namespace dbus diff --git a/dbus/object_path.h b/dbus/object_path.h index 89c5287..072c23d 100644 --- a/dbus/object_path.h +++ b/dbus/object_path.h @@ -5,6 +5,7 @@ #ifndef DBUS_OBJECT_PATH_H_ #define DBUS_OBJECT_PATH_H_ +#include <iosfwd> #include <string> #include "dbus/dbus_export.h" @@ -46,6 +47,9 @@ class CHROME_DBUS_EXPORT ObjectPath { std::string value_; }; +// This is required by gtest to print a readable output on test failures. +CHROME_DBUS_EXPORT void PrintTo(const ObjectPath& path, std::ostream* out); + } // namespace dbus #endif // DBUS_OBJECT_PATH_H_ |