[PATCH] D42740: Implement a case-folding version of DJB hash

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 10:47:13 PST 2018


dblaikie added inline comments.


================
Comment at: unittests/Support/DJBTest.cpp:16
+
+TEST(DJBTest, caseFoldingDjbHash) {
+  struct TestCase {
----------------
Given that this is a specific hash with a guaranteed result (for portability - debuggers are expected to have their own implementation of this hash that would produce the same values, etc) - should this have some tests for the actual hash values of some non-trivial text?

(also this test doesn't test for any hash values differing - the whole test would pass if the hash function returned a single constant for all inputs, right?)


Repository:
  rL LLVM

https://reviews.llvm.org/D42740





More information about the llvm-commits mailing list