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

Unified Diff: base/tuple_unittest.cc

Issue 1612: Implement "iframe shim" behavior for windowed plugins.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 3 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 | « base/tuple.h ('k') | chrome/browser/drag_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tuple_unittest.cc
===================================================================
--- base/tuple_unittest.cc (revision 2783)
+++ base/tuple_unittest.cc (working copy)
@@ -18,6 +18,13 @@
}
};
+struct Addz {
+ Addz() { }
+ void DoAdd(int a, int b, int c, int d, int e, int* res) {
+ *res = a + b + c + d + e;
+ }
+};
+
} // namespace
TEST(TupleTest, Basic) {
@@ -27,6 +34,7 @@
Tuple3<int, int, int> t3(1, 2, 3);
Tuple4<int, int, int, int*> t4(1, 2, 3, &t1.a);
Tuple5<int, int, int, int, int*> t5(1, 2, 3, 4, &t4.a);
+ Tuple6<int, int, int, int, int, int*> t6(1, 2, 3, 4, 5, &t4.a);
EXPECT_EQ(1, t1.a);
EXPECT_EQ(1, t2.a);
@@ -40,8 +48,12 @@
EXPECT_EQ(2, t5.b);
EXPECT_EQ(3, t5.c);
EXPECT_EQ(4, t5.d);
+ EXPECT_EQ(1, t6.a);
+ EXPECT_EQ(2, t6.b);
+ EXPECT_EQ(3, t6.c);
+ EXPECT_EQ(4, t6.d);
+ EXPECT_EQ(5, t6.e);
-
EXPECT_EQ(1, t1.a);
DispatchToFunction(&DoAdd, t4);
EXPECT_EQ(6, t1.a);
@@ -54,6 +66,11 @@
EXPECT_EQ(1, t4.a);
DispatchToMethod(&addy, &Addy::DoAdd, t5);
EXPECT_EQ(10, t4.a);
+
+ Addz addz;
+ EXPECT_EQ(10, t4.a);
+ DispatchToMethod(&addz, &Addz::DoAdd, t6);
+ EXPECT_EQ(15, t4.a);
}
namespace {
« no previous file with comments | « base/tuple.h ('k') | chrome/browser/drag_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698