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

Unified Diff: base/rand_util_unittest.cc

Issue 8418034: Make string_util::WriteInto() DCHECK() that the supplied |length_with_null| > 1, meaning that the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
Index: base/rand_util_unittest.cc
===================================================================
--- base/rand_util_unittest.cc (revision 107404)
+++ base/rand_util_unittest.cc (working copy)
@@ -41,8 +41,8 @@
}
TEST(RandUtilTest, RandBytesAsString) {
- std::string random_string = base::RandBytesAsString(0);
- EXPECT_EQ(0U, random_string.size());
+ std::string random_string = base::RandBytesAsString(1);
+ EXPECT_EQ(1U, random_string.size());
random_string = base::RandBytesAsString(145);
EXPECT_EQ(145U, random_string.size());
char accumulator = 0;
« no previous file with comments | « base/rand_util.cc ('k') | base/string_util.h » ('j') | crypto/encryptor_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698