Blame test-crc32c.c

Packit da863b
/* vim: set tabstop=8 shiftwidth=4 softtabstop=4 expandtab smarttab colorcolumn=80: */
Packit da863b
/*
Packit da863b
 * Copyright (c) 2016 Red Hat, Inc.
Packit da863b
 * Author: Nathaniel McCallum <npmccallum@redhat.com>
Packit da863b
 *
Packit da863b
 * This program is free software: you can redistribute it and/or modify it
Packit da863b
 * under the terms of the GNU Lesser General Public License as published by
Packit da863b
 * the Free Software Foundation, either version 2.1 of the License, or
Packit da863b
 * (at your option) any later version.
Packit da863b
 *
Packit da863b
 * This program is distributed in the hope that it will be useful,
Packit da863b
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit da863b
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit da863b
 * GNU Lesser General Public License for more details.
Packit da863b
 *
Packit da863b
 * You should have received a copy of the GNU Lesser General Public License
Packit da863b
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit da863b
 */
Packit da863b
Packit da863b
#include "crc32c.h"
Packit da863b
Packit da863b
#include <stdio.h>
Packit da863b
Packit da863b
int
Packit da863b
main(int argc, char *argv[])
Packit da863b
{
Packit da863b
    char test[] = { '1', '2', '3', '4', '5', '6', '7', '8', '9' };
Packit da863b
    return crc32c(0, test, sizeof(test)) == 0xe3069283 ? 0 : 1;
Packit da863b
}