1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

Remove unused crc64 function

Signed-off-by: Paul Jones <paul@pauljones.id.au>
This commit is contained in:
Paul Jones 2016-12-13 12:52:26 +11:00
parent 8abdeabddc
commit 334f5f83ee
3 changed files with 0 additions and 21 deletions

View File

@ -8,7 +8,6 @@
namespace crucible { namespace crucible {
namespace Digest { namespace Digest {
namespace CRC { namespace CRC {
uint64_t crc64(const char *s);
uint64_t crc64(const void *p, size_t len); uint64_t crc64(const void *p, size_t len);
}; };
}; };

View File

@ -65,13 +65,6 @@ namespace crucible {
} }
} }
// This function is only used for tests
uint64_t
Digest::CRC::crc64(const char *s)
{
return crc64(static_cast<const void *>(s), strlen(s));
}
uint64_t uint64_t
Digest::CRC::crc64(const void *p, size_t len) Digest::CRC::crc64(const void *p, size_t len)
{ {

View File

@ -5,18 +5,6 @@
using namespace crucible; using namespace crucible;
static
void
test_getcrc64_strings()
{
assert(Digest::CRC::crc64("John") == 5942451273432301568);
assert(Digest::CRC::crc64("Paul") == 5838402100630913024);
assert(Digest::CRC::crc64("George") == 6714394476893704192);
assert(Digest::CRC::crc64("Ringo") == 6038837226071130112);
assert(Digest::CRC::crc64("") == 0);
assert(Digest::CRC::crc64("\377\277\300\200") == 15615382887346470912ULL);
}
static static
void void
test_getcrc64_byte_arrays() test_getcrc64_byte_arrays()
@ -32,7 +20,6 @@ test_getcrc64_byte_arrays()
int int
main(int, char**) main(int, char**)
{ {
RUN_A_TEST(test_getcrc64_strings());
RUN_A_TEST(test_getcrc64_byte_arrays()); RUN_A_TEST(test_getcrc64_byte_arrays());
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);