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

Unified Diff: base/tuple_unittest.cc

Issue 2797133002: Replace base::get with std::get (Closed)
Patch Set: +styleguide Created 3 years, 8 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') | styleguide/c++/c++11.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tuple_unittest.cc
diff --git a/base/tuple_unittest.cc b/base/tuple_unittest.cc
index 6f90c2922064610cb7426cad5095cc2bc042a01f..815b43bb1b3236b10cc5a142b4d5ef1e264d84b1 100644
--- a/base/tuple_unittest.cc
+++ b/base/tuple_unittest.cc
@@ -114,30 +114,4 @@ TEST(TupleTest, Copying) {
EXPECT_EQ(2, CopyLogger::TimesCopied);
}
-TEST(TupleTest, Get) {
- int i = 1;
- int j = 2;
- std::tuple<int, int&, int&&> t(3, i, std::move(j));
- EXPECT_TRUE((std::is_same<int&, decltype(base::get<0>(t))>::value));
- EXPECT_EQ(3, base::get<0>(t));
-
- EXPECT_TRUE((std::is_same<int&, decltype(base::get<1>(t))>::value));
- EXPECT_EQ(1, base::get<1>(t));
-
- EXPECT_TRUE((std::is_same<int&, decltype(base::get<2>(t))>::value));
- EXPECT_EQ(2, base::get<2>(t));
-
- EXPECT_TRUE((std::is_same<int&&,
- decltype(base::get<0>(std::move(t)))>::value));
- EXPECT_EQ(3, base::get<0>(std::move(t)));
-
- EXPECT_TRUE((std::is_same<int&,
- decltype(base::get<1>(std::move(t)))>::value));
- EXPECT_EQ(1, base::get<1>(std::move(t)));
-
- EXPECT_TRUE((std::is_same<int&&,
- decltype(base::get<2>(std::move(t)))>::value));
- EXPECT_EQ(2, base::get<2>(std::move(t)));
-}
-
} // namespace base
« no previous file with comments | « base/tuple.h ('k') | styleguide/c++/c++11.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698