Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2192a91d
Commit
2192a91d
authored
Apr 24, 2020
by
Madelyn Olson
Browse files
Made crc64 test consistent
parent
486e45ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/crc64.c
View file @
2192a91d
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "crcspeed.h"
#include "crcspeed.h"
static
uint64_t
crc64_table
[
8
][
256
]
=
{{
0
}};
static
uint64_t
crc64_table
[
8
][
256
]
=
{{
0
}};
#define POLY UINT64_C(0xad93d23594c935a9)
/******************** BEGIN GENERATED PYCRC FUNCTIONS ********************/
/******************** BEGIN GENERATED PYCRC FUNCTIONS ********************/
/**
/**
* Generated on Sun Dec 21 14:14:07 2014,
* Generated on Sun Dec 21 14:14:07 2014,
...
@@ -122,7 +123,7 @@ uint64_t crc64(uint64_t crc, const unsigned char *s, uint64_t l) {
...
@@ -122,7 +123,7 @@ uint64_t crc64(uint64_t crc, const unsigned char *s, uint64_t l) {
}
}
/* Test main */
/* Test main */
#if
def
ined(REDIS_TEST) || defined(
REDIS_TEST
_MAIN)
#ifdef
REDIS_TEST
#include <stdio.h>
#include <stdio.h>
#define UNUSED(x) (void)(x)
#define UNUSED(x) (void)(x)
...
@@ -133,7 +134,7 @@ int crc64Test(int argc, char *argv[]) {
...
@@ -133,7 +134,7 @@ int crc64Test(int argc, char *argv[]) {
printf
(
"[calcula]: e9c6d914c4b8d9ca == %016"
PRIx64
"
\n
"
,
printf
(
"[calcula]: e9c6d914c4b8d9ca == %016"
PRIx64
"
\n
"
,
(
uint64_t
)
_crc64
(
0
,
"123456789"
,
9
));
(
uint64_t
)
_crc64
(
0
,
"123456789"
,
9
));
printf
(
"[64speed]: e9c6d914c4b8d9ca == %016"
PRIx64
"
\n
"
,
printf
(
"[64speed]: e9c6d914c4b8d9ca == %016"
PRIx64
"
\n
"
,
(
uint64_t
)
crc64
speed
(
0
,
"123456789"
,
9
));
(
uint64_t
)
crc64
(
0
,
"123456789"
,
9
));
char
li
[]
=
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed "
char
li
[]
=
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed "
"do eiusmod tempor incididunt ut labore et dolore magna "
"do eiusmod tempor incididunt ut labore et dolore magna "
"aliqua. Ut enim ad minim veniam, quis nostrud exercitation "
"aliqua. Ut enim ad minim veniam, quis nostrud exercitation "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment