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

Side by Side Diff: crypto/random_unittest.cc

Issue 6873156: Move crypto_helpers from sync to base (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Correct headers. Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« crypto/random.cc ('K') | « crypto/random.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "crypto/random.h"
6 #include "testing/gtest/include/gtest/gtest.h"
7
8 TEST(CryptoHelpers, GetRandomBytes) {
9 for (int i = 1; i < 25; ++i) {
10 std::string random_bytes(i+1, ' ');
wtc 2011/04/28 19:42:22 Nit: Google Style Guide recommends adding spaces a
11 do {
12 GetRandomBytes(&random_bytes[0], i);
13 ASSERT_EQ(random_bytes[i], ' ');
14 } while (random_bytes[i - 1] == ' ');
15 }
16 }
OLDNEW
« crypto/random.cc ('K') | « crypto/random.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698