summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-08-14 16:03:29 +0000
committerAlexey Samsonov <samsonov@google.com>2013-08-14 16:03:29 +0000
commitef7aefc53bf24214f489bf9e4100bcff45f7b12a (patch)
treec0cea3f882e2a1f4f1d084b69adcd66ab1a5addc /unittests
parent14a5c695a9a4dc773cfc37c0c4a847e0160e5396 (diff)
downloadllvm-ef7aefc53bf24214f489bf9e4100bcff45f7b12a.tar.gz
llvm-ef7aefc53bf24214f489bf9e4100bcff45f7b12a.tar.bz2
llvm-ef7aefc53bf24214f489bf9e4100bcff45f7b12a.tar.xz
Expose CRC-32 implementation from zlib
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Support/CompressionTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/Support/CompressionTest.cpp b/unittests/Support/CompressionTest.cpp
index c8e2cd9f02..c0a9adadb7 100644
--- a/unittests/Support/CompressionTest.cpp
+++ b/unittests/Support/CompressionTest.cpp
@@ -63,6 +63,12 @@ TEST(CompressionTest, Zlib) {
TestZlibCompression(BinaryDataStr, zlib::DefaultCompression);
}
+TEST(CompressionTest, ZlibCRC32) {
+ EXPECT_EQ(
+ 0x414FA339U,
+ zlib::crc32(StringRef("The quick brown fox jumps over the lazy dog")));
+}
+
#endif
}