mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
8febcffdc5
Previously, many files had individual main() functions for testing, but each required being compiled with their own testing flags. That gets difficult when you have 8 different flags you need to set just to run all tests (plus, some test files required other files to be compiled aaginst them, and it seems some didn't build at all without including the rest of Redis). Now all individual test main() funcions are renamed to a test function for the file itself and one global REDIS_TEST define enables testing across the entire codebase. Tests can now be run with: - `./redis-server test <test>` e.g. ./redis-server test ziplist If REDIS_TEST is not defined, then no tests get included and no tests are included in the final redis-server binary.
13 lines
193 B
C
13 lines
193 B
C
#ifndef CRC64_H
|
|
#define CRC64_H
|
|
|
|
#include <stdint.h>
|
|
|
|
uint64_t crc64(uint64_t crc, const unsigned char *s, uint64_t l);
|
|
|
|
#ifdef REDIS_TEST
|
|
int crc64Test(int argc, char *argv[]);
|
|
#endif
|
|
|
|
#endif
|