Index: cc/test/output_test_common.h |
diff --git a/cc/test/output_test_common.h b/cc/test/output_test_common.h |
index a02c6c34cdb1fdb8e173d93a3d9e11b4bd0187cf..54c530b18246df849c989f20501b373fa7dcdf61 100644 |
--- a/cc/test/output_test_common.h |
+++ b/cc/test/output_test_common.h |
@@ -9,6 +9,7 @@ |
#include "base/time/time.h" |
#include "cc/output/begin_frame_args.h" |
+#include "testing/gtest/include/gtest/gtest.h" |
namespace cc { |
@@ -19,6 +20,17 @@ BeginFrameArgs BeginFrameArgsCreateQuick(int64 frame_time, |
int64 deadline, |
int64 interval); |
+// gtest helpers -- these *must* be in the same namespace as the types they |
+// operate on. |
+ |
+// Allow "EXPECT_EQ(args1, args2);" |
+// We don't define operator!= because EXPECT_NE(args1, args2) isn't all that |
+// sensible. |
+bool operator==(BeginFrameArgs lhs, BeginFrameArgs rhs); |
brianderson
2014/05/08 16:56:32
Is it possible to make this:
bool operator==(const
mithro-old
2014/05/08 22:21:21
Yes! Done.
|
+ |
+// Allow gtest to pretty print begin frame args. |
+void PrintTo(const BeginFrameArgs& args, ::std::ostream* os); |
+ |
} // namespace cc |
#endif // CC_TEST_OUTPUT_TEST_COMMON_H_ |