OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A test for ZLib's checksum function. | 5 // A test for ZLib's checksum function. |
6 | 6 |
7 #include "rlz/lib/crc32.h" | 7 #include "rlz/lib/crc32.h" |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 {"Google\r\n" , 0x83A3E860}, | 43 {"Google\r\n" , 0x83A3E860}, |
44 {NULL , 0x0}, | 44 {NULL , 0x0}, |
45 }; | 45 }; |
46 | 46 |
47 int crc; | 47 int crc; |
48 for (int i = 0; kData[i].data; i++) { | 48 for (int i = 0; kData[i].data; i++) { |
49 EXPECT_TRUE(rlz_lib::Crc32(kData[i].data, &crc)); | 49 EXPECT_TRUE(rlz_lib::Crc32(kData[i].data, &crc)); |
50 EXPECT_EQ(kData[i].crc, crc); | 50 EXPECT_EQ(kData[i].crc, crc); |
51 } | 51 } |
52 } | 52 } |
OLD | NEW |