diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2016-02-03 13:19:49 -0800 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2016-02-04 11:02:18 -0800 |
commit | bbab196fe58e5657d90f6f40a19fb93c2a91a8ac (patch) | |
tree | bb464ee333126d601b4f018aff7c9e2d1062b41b | |
parent | 7f9c122ab98d84e54647541edf99e72dec86f6db (diff) | |
download | native-bbab196fe58e5657d90f6f40a19fb93c2a91a8ac.tar.gz |
Binder::Status: Add operator<< to help with gtest logging
Change-Id: I22fcf7c6314451701ba947af2d69d4e45b22345a
-rw-r--r-- | include/binder/Status.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/binder/Status.h b/include/binder/Status.h index 203a01e39c..ce947fa3de 100644 --- a/include/binder/Status.h +++ b/include/binder/Status.h @@ -141,6 +141,13 @@ private: 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 |