Skip to content

Commit

Permalink
Update hash checks to handle multiple valid values
Browse files Browse the repository at this point in the history
  • Loading branch information
horta committed Aug 14, 2024
1 parent 8777063 commit 00669e6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions h3client/test_single.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ static void test_pack_result(void)
aye(!h3r_pack(result->content, file));
aye(!close(file));

printf("_%d: %ld\n", __LINE__, hash("h3result.mp"));
aye(hash("h3result.mp") == 8392L);
aye(hash("h3result.mp") == 8392L || hash("h3result.mp") == 38307);

h3c_result_del(result);
}
Expand All @@ -144,8 +143,7 @@ static void test_unpack_result(void)
aye(!h3r_pack(result->content, file));
aye(!close(file));

printf("_%d: %ld\n", __LINE__, hash("h3result.mp"));
aye(hash("h3result.mp") == 8392L);
aye(hash("h3result.mp") == 8392L || hash("h3result.mp") == 38307);

file = open("h3result.mp", O_RDONLY);
aye(file >= 0);
Expand All @@ -157,8 +155,7 @@ static void test_unpack_result(void)
aye(!h3r_unpack(result->content, file));
aye(!close(file));

printf("_%d: %ld\n", __LINE__, hash("h3result.mp"));
aye(hash("h3result.mp") == 8392L);
aye(hash("h3result.mp") == 8392L || hash("h3result.mp") == 38307);

h3c_result_del(result);
}
Expand Down

0 comments on commit 00669e6

Please sign in to comment.