Use |nullptr| instead of |NULL| in crc32_unittest.cc
https://google.github.io/styleguide/cppguide.html#0_and_nullptr/NULL says: "For pointers (address values), use nullptr, as this provides type-safety." Furthermore, NULL/0 won't compile if we change |SomeClass*| to |CheckedPtr<SomeClass>|. See go/miracleptr for project details. Bug: 1080832 Change-Id: I00908679918e2c2316b25d9fd834914e540bd163 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2512484 Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Kentaro Hara <haraken@chromium.org> Auto-Submit: Bartek Nowierski <bartekn@chromium.org> Cr-Commit-Position: refs/heads/master@{#822946}
This commit is contained in:

committed by
Commit Bot

parent
2d19fe045e
commit
3f87fe461c
@ -16,11 +16,11 @@ TEST(Crc32Unittest, ByteTest) {
|
||||
// Externally calculated at http://crc32-checksum.waraxe.us/
|
||||
int crc;
|
||||
} kData[] = {
|
||||
{"Hello" , 5, 0xF7D18982},
|
||||
{"Google" , 6, 0x62B0F067},
|
||||
{"" , 0, 0x0},
|
||||
{"One more string.", 16, 0x0CA14970},
|
||||
{NULL , 0, 0x0},
|
||||
{"Hello", 5, 0xF7D18982},
|
||||
{"Google", 6, 0x62B0F067},
|
||||
{"", 0, 0x0},
|
||||
{"One more string.", 16, 0x0CA14970},
|
||||
{nullptr, 0, 0x0},
|
||||
};
|
||||
|
||||
for (int i = 0; kData[i].data; i++)
|
||||
@ -35,12 +35,12 @@ TEST(Crc32Unittest, CharTest) {
|
||||
// Externally calculated at http://crc32-checksum.waraxe.us/
|
||||
int crc;
|
||||
} kData[] = {
|
||||
{"Hello" , 0xF7D18982},
|
||||
{"Google" , 0x62B0F067},
|
||||
{"" , 0x0},
|
||||
{"One more string.", 0x0CA14970},
|
||||
{"Google\r\n" , 0x83A3E860},
|
||||
{NULL , 0x0},
|
||||
{"Hello", 0xF7D18982},
|
||||
{"Google", 0x62B0F067},
|
||||
{"", 0x0},
|
||||
{"One more string.", 0x0CA14970},
|
||||
{"Google\r\n", 0x83A3E860},
|
||||
{nullptr, 0x0},
|
||||
};
|
||||
|
||||
int crc;
|
||||
|
Reference in New Issue
Block a user