Commit 0066be97 authored by fbarchard@google.com's avatar fbarchard@google.com

test hash of quick brown fox for known hash value

BUG=none
TESTED=out\release\libyuv_unittest --gtest_filter=libyuvTest.Djb2_Test
R=johannkoenig@google.com

Review URL: https://webrtc-codereview.appspot.com/1527004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@699 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 031f05fd
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 698
Version: 699
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 698
#define LIBYUV_VERSION 699
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -35,6 +35,13 @@ TEST_F(libyuvTest, Djb2_Test) {
align_buffer_64(src_a, kMaxTest)
align_buffer_64(src_b, kMaxTest)
const char* fox = "The quick brown fox jumps over the lazy dog"
" and feels as if he were in the seventh heaven of typography"
" together with Hermann Zapf";
uint32 foxhash = HashDjb2(reinterpret_cast<const uint8*>(fox), 131, 5381);
const uint32 kExpectedFoxHash = 2611006483;
EXPECT_EQ(kExpectedFoxHash, foxhash);
for (int i = 0; i < kMaxTest; ++i) {
src_a[i] = (random() & 0xff);
src_b[i] = (random() & 0xff);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment