Skip to content

Commit

Permalink
Fix a bug in the SipHash tests causing them to fail on Big Endian
Browse files Browse the repository at this point in the history
There was nothing wrong with the SipHash implementation itself, just the
test. It accidently changed Grapheme32 array to little endian instead of
making Grapheme32_LE array little endian.
  • Loading branch information
samcv committed Jul 26, 2018
1 parent a1de6de commit ce9f741
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/strings/siphash/test.c
Expand Up @@ -61,9 +61,9 @@ int testmvm (void) {
size_t s_len = 9;
uint64_t t0, t1, t2, t3;
int32_t Grapheme32[9] = { 171, -72, 69, 76, 76, 79, 9829, 9826, 187 };
int32_t Grapheme32_LE[9] = { 171, -72, 69, 76, 76, 79, 9829, 9826, 187 };
int32_t Grapheme32_LE[9];
for (i = 0; i < 9; i++) {
Grapheme32[i] = MVM_TO_LITTLE_ENDIAN_32(Grapheme32[i]);
Grapheme32_LE[i] = MVM_TO_LITTLE_ENDIAN_32(Grapheme32[i]);
}
t0 = gettime_ns();
for (rep_count = 0; rep_count < REPEATS; rep_count++) {
Expand Down

0 comments on commit ce9f741

Please sign in to comment.