diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-14 11:38:45 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-08-14 17:16:47 +0000 |
commit | 3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859 (patch) | |
tree | 43cc572ba067417c7341db81f71ae7cc6e0fcc3e /chromium/base/tuple_unittest.cc | |
parent | f61ab1ac7f855cd281809255c0aedbb1895e1823 (diff) | |
download | qtwebengine-chromium-3a97ca8dd9b96b599ae2d33e40df0dd2f7ea5859.tar.gz |
BASELINE: Update chromium to 45.0.2454.40
Change-Id: Id2121d9f11a8fc633677236c65a3e41feef589e4
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'chromium/base/tuple_unittest.cc')
-rw-r--r-- | chromium/base/tuple_unittest.cc | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/chromium/base/tuple_unittest.cc b/chromium/base/tuple_unittest.cc index 5b43affc600..55a91392353 100644 --- a/chromium/base/tuple_unittest.cc +++ b/chromium/base/tuple_unittest.cc @@ -7,6 +7,8 @@ #include "base/compiler_specific.h" #include "testing/gtest/include/gtest/gtest.h" +namespace base { + namespace { void DoAdd(int a, int b, int c, int* res) { @@ -30,14 +32,15 @@ struct Addz { } // namespace TEST(TupleTest, Basic) { - Tuple<> t0 = MakeTuple(); + base::Tuple<> t0 = base::MakeTuple(); ALLOW_UNUSED_LOCAL(t0); - Tuple<int> t1(1); - Tuple<int, const char*> t2 = MakeTuple(1, static_cast<const char*>("wee")); - Tuple<int, int, int> t3(1, 2, 3); - Tuple<int, int, int, int*> t4(1, 2, 3, &get<0>(t1)); - Tuple<int, int, int, int, int*> t5(1, 2, 3, 4, &get<0>(t4)); - Tuple<int, int, int, int, int, int*> t6(1, 2, 3, 4, 5, &get<0>(t4)); + base::Tuple<int> t1(1); + base::Tuple<int, const char*> t2 = + base::MakeTuple(1, static_cast<const char*>("wee")); + base::Tuple<int, int, int> t3(1, 2, 3); + base::Tuple<int, int, int, int*> t4(1, 2, 3, &get<0>(t1)); + base::Tuple<int, int, int, int, int*> t5(1, 2, 3, 4, &get<0>(t4)); + base::Tuple<int, int, int, int, int, int*> t6(1, 2, 3, 4, 5, &get<0>(t4)); EXPECT_EQ(1, get<0>(t1)); EXPECT_EQ(1, get<0>(t2)); @@ -62,7 +65,7 @@ TEST(TupleTest, Basic) { EXPECT_EQ(6, get<0>(t1)); int res = 0; - DispatchToFunction(&DoAdd, MakeTuple(9, 8, 7, &res)); + DispatchToFunction(&DoAdd, base::MakeTuple(9, 8, 7, &res)); EXPECT_EQ(24, res); Addy addy; @@ -108,7 +111,7 @@ TEST(TupleTest, Copying) { bool res = false; // Creating the tuple should copy the class to store internally in the tuple. - Tuple<CopyLogger, CopyLogger*, bool*> tuple(logger, &logger, &res); + base::Tuple<CopyLogger, CopyLogger*, bool*> tuple(logger, &logger, &res); get<1>(tuple) = &get<0>(tuple); EXPECT_EQ(2, CopyLogger::TimesConstructed); EXPECT_EQ(1, CopyLogger::TimesCopied); @@ -127,3 +130,5 @@ TEST(TupleTest, Copying) { EXPECT_EQ(3, CopyLogger::TimesConstructed); EXPECT_EQ(2, CopyLogger::TimesCopied); } + +} // namespace base |