syncfiles/lib/crc32_test.c
Dietrich Epp 3bf095fb49 Make source file headers consistent
- Standardize copyright and license notice
- Standardize header guards
2022-04-10 04:22:58 -04:00

26 lines
582 B
C

// Copyright 2022 Dietrich Epp.
// This file is part of SyncFiles. SyncFiles is licensed under the terms of the
// Mozilla Public License, version 2.0. See LICENSE.txt for details.
#include "lib/crc32.h"
#include <stdio.h>
static const char kTest[9] = {'1', '2', '3', '4', '5', '6', '7', '8', '9'};
int main(int argc, char **argv)
{
UInt32 expect;
UInt32 val;
(void)argc;
(void)argv;
expect = 0xcbf43926;
val = CRC32Update(0, kTest, sizeof(kTest));
if (val != expect) {
fprintf(stderr, "Error: CRC = 0x%08x, expect 0x%08x\n", val, expect);
return 1;
}
return 0;
}