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

Unified Diff: base/strings/string_util_unittest.cc

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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/profiler/tracked_time.cc ('k') | base/strings/stringprintf.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_util_unittest.cc
diff --git a/base/strings/string_util_unittest.cc b/base/strings/string_util_unittest.cc
index 923116d115bd055d7db39162a642584a183a36da..d887c0b35db8dce5834d4aacb04d4696e9abeeb9 100644
--- a/base/strings/string_util_unittest.cc
+++ b/base/strings/string_util_unittest.cc
@@ -669,39 +669,6 @@ TEST(StringUtilTest, HexDigitToInt) {
EXPECT_EQ(15, HexDigitToInt('f'));
}
-// This checks where we can use the assignment operator for a va_list. We need
-// a way to do this since Visual C doesn't support va_copy, but assignment on
-// va_list is not guaranteed to be a copy. See StringAppendVT which uses this
-// capability.
-static void VariableArgsFunc(const char* format, ...) {
- va_list org;
- va_start(org, format);
-
- va_list dup;
- GG_VA_COPY(dup, org);
- int i1 = va_arg(org, int);
- int j1 = va_arg(org, int);
- char* s1 = va_arg(org, char*);
- double d1 = va_arg(org, double);
- va_end(org);
-
- int i2 = va_arg(dup, int);
- int j2 = va_arg(dup, int);
- char* s2 = va_arg(dup, char*);
- double d2 = va_arg(dup, double);
-
- EXPECT_EQ(i1, i2);
- EXPECT_EQ(j1, j2);
- EXPECT_STREQ(s1, s2);
- EXPECT_EQ(d1, d2);
-
- va_end(dup);
-}
-
-TEST(StringUtilTest, VAList) {
- VariableArgsFunc("%d %d %s %lf", 45, 92, "This is interesting", 9.21);
-}
-
// Test for Tokenize
template <typename STR>
void TokenizeTest() {
« no previous file with comments | « base/profiler/tracked_time.cc ('k') | base/strings/stringprintf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698