Binder::Status: Add operator<< to help with gtest logging
Change-Id: I22fcf7c6314451701ba947af2d69d4e45b22345a
diff --git a/include/binder/Status.h b/include/binder/Status.h
index 203a01e..ce947fa 100644
--- a/include/binder/Status.h
+++ b/include/binder/Status.h
@@ -141,6 +141,13 @@
String8 mMessage;
}; // class Status
+// For gtest output logging
+template<typename T>
+T& operator<< (T& stream, const Status& s) {
+ stream << s.toString8().string();
+ return stream;
+}
+
} // namespace binder
} // namespace android