OLD | NEW |
---|---|
(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 } | |
OLD | NEW |