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

Side by Side Diff: base/md5_unittest.cc

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 years, 12 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
« no previous file with comments | « base/md5.h ('k') | base/message_loop/incoming_task_queue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string.h> 5 #include <string.h>
6 #include <string> 6 #include <string>
7 7
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
10 #include "base/md5.h" 9 #include "base/md5.h"
11 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
12 11
13 namespace base { 12 namespace base {
14 13
15 TEST(MD5, DigestToBase16) { 14 TEST(MD5, DigestToBase16) {
16 MD5Digest digest; 15 MD5Digest digest;
17 16
18 int data[] = { 17 int data[] = {
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 242
244 // The header and full digest pairs are the same, and they aren't the same as 243 // The header and full digest pairs are the same, and they aren't the same as
245 // each other. 244 // each other.
246 EXPECT_TRUE(!memcmp(&header_digest, &check_header_digest, 245 EXPECT_TRUE(!memcmp(&header_digest, &check_header_digest,
247 sizeof(header_digest))); 246 sizeof(header_digest)));
248 EXPECT_TRUE(!memcmp(&digest, &check_full_digest, sizeof(digest))); 247 EXPECT_TRUE(!memcmp(&digest, &check_full_digest, sizeof(digest)));
249 EXPECT_TRUE(memcmp(&digest, &header_digest, sizeof(digest))); 248 EXPECT_TRUE(memcmp(&digest, &header_digest, sizeof(digest)));
250 } 249 }
251 250
252 } // namespace base 251 } // namespace base
OLDNEW
« no previous file with comments | « base/md5.h ('k') | base/message_loop/incoming_task_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698