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

Unified Diff: base/strings/safe_sprintf_unittest.cc

Issue 102993006: Remove C++11 specific version of SafeSNPrintf() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update unit test as well Created 7 years 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/strings/safe_sprintf.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/safe_sprintf_unittest.cc
diff --git a/base/strings/safe_sprintf_unittest.cc b/base/strings/safe_sprintf_unittest.cc
index 0e1423511031c5f831b966031c4d252480f78355..937fa4eca2329342377ce1596199b62bf3b37935 100644
--- a/base/strings/safe_sprintf_unittest.cc
+++ b/base/strings/safe_sprintf_unittest.cc
@@ -264,18 +264,6 @@ TEST(SafeSPrintfTest, NArgs) {
EXPECT_EQ(10, SafeSNPrintf(buf, 11, "%c%c%c%c%c%c%c%c%c%c",
1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
EXPECT_EQ("\1\2\3\4\5\6\7\10\11\12", std::string(buf));
-
-
- // C++11 is smart enough to handle variadic template arguments. It can
- // deal with arbitrary numbers of arguments.
-#if __cplusplus >= 201103 // C++11
- EXPECT_EQ(11, SafeSPrintf(buf, "%c%c%c%c%c%c%c%c%c%c%c",
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11));
- EXPECT_EQ("\1\2\3\4\5\6\7\10\11\12\13", std::string(buf));
- EXPECT_EQ(11, SafeSNPrintf(buf, 12, "%c%c%c%c%c%c%c%c%c%c%c",
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11));
- EXPECT_EQ("\1\2\3\4\5\6\7\10\11\12\13", std::string(buf));
-#endif
}
TEST(SafeSPrintfTest, DataTypes) {
« no previous file with comments | « base/strings/safe_sprintf.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698