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

Unified Diff: cc/test/output_test_common.h

Issue 273823002: Adding gtest helpers for BeginFrameArgs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/test/output_test_common.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « no previous file | cc/test/output_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698