Permalink
Browse files

add test for CityHashCrc128WithSeed.

  • Loading branch information...
1 parent 18d6458 commit 0d3b6ac9887ed2625852940a365499ed658043d3 @fbzhong committed May 7, 2011
Showing with 4 additions and 0 deletions.
  1. +3 −0 test-sample/main.cc
  2. +1 −0 test.js
View
@@ -27,6 +27,9 @@ int main (int argc, const char * argv[])
hash = CityHashCrc128("Hello", strlen("Hello"));
std::cout << "CityHashCrc128(\"Hello\") : " << hash.first << "," << hash.second << std::endl;
+ hash = CityHashCrc128WithSeed("Hello", strlen("Hello"), seed);
+ std::cout << "CityHashCrc128WithSeed(\"Hello\") : " << hash.first << "," << hash.second << std::endl;
+
return 0;
}
View
@@ -30,5 +30,6 @@ assertEqual('13523890104784088047,17404193039403234796', cityhash.hash128('hello
assertEqual('15779891233746910938,15118107765960464233', cityhash.hash128('Hello', '12343,30293'), 'Hash128 for "Hello" with seed 12343,30293');
assertEqual('9138004313465017137,12242971252332641544', cityhash.crc128('Hello'), 'Crc128 for "Hello"');
+assertEqual('15779891233746910938,15118107765960464233', cityhash.crc128('Hello', '12343,30293'), 'Crc128 for "Hello" with seed 12343,30293');
end();

0 comments on commit 0d3b6ac

Please sign in to comment.