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

Side by Side Diff: tests/crc32_test.c

Issue 2809037: Make vboot_reference build in MSVC command line environment. (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: Integrated trunk changes. Created 10 years, 6 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 | « tests/cgptlib_test.c ('k') | tests/rollback_index_mock.c » ('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) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS 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 5
6 #include "crc32_test.h" 6 #include "crc32_test.h"
7 #include "cgptlib_test.h" 7 #include "cgptlib_test.h"
8 #include "crc32.h" 8 #include "crc32.h"
9 #include "test_common.h"
9 #include "utility.h" 10 #include "utility.h"
10 11
11 #define MAX_VECTOR_LEN 256 12 #define MAX_VECTOR_LEN 256
12 13
13 int TestCrc32TestVectors() { 14 int TestCrc32TestVectors() {
14 struct { 15 struct {
15 uint8_t vector[MAX_VECTOR_LEN]; 16 uint8_t vector[MAX_VECTOR_LEN];
16 int len; 17 int len;
17 uint32_t crc32; 18 uint32_t crc32;
18 } cases[] = { 19 } cases[] = {
(...skipping 19 matching lines...) Expand all
38 int i; 39 int i;
39 40
40 for (i = 0; i < ARRAY_SIZE(cases); ++i) { 41 for (i = 0; i < ARRAY_SIZE(cases); ++i) {
41 uint32_t crc32; 42 uint32_t crc32;
42 43
43 crc32 = Crc32(cases[i].vector, cases[i].len); 44 crc32 = Crc32(cases[i].vector, cases[i].len);
44 EXPECT(crc32 == cases[i].crc32); 45 EXPECT(crc32 == cases[i].crc32);
45 } 46 }
46 return TEST_OK; 47 return TEST_OK;
47 } 48 }
OLDNEW
« no previous file with comments | « tests/cgptlib_test.c ('k') | tests/rollback_index_mock.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698