about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-10 17:56:14 -0800
committerEric Wong <normalperson@yhbt.net>2010-12-10 17:57:06 -0800
commit93e36dd664a9d3f95456769ca2d29c48503bd0e7 (patch)
tree7a5a243989d60d33daf5a2d47c054686a003a98e /test
parent4e4166437ac88aa6df4ffcd4ed8452cb5eb8750e (diff)
downloadruby-tdb-93e36dd664a9d3f95456769ca2d29c48503bd0e7.tar.gz
It's nice to have common hash functions available...
Diffstat (limited to 'test')
-rw-r--r--test/test_tdb_hash_functions.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_tdb_hash_functions.rb b/test/test_tdb_hash_functions.rb
new file mode 100644
index 0000000..86c599a
--- /dev/null
+++ b/test/test_tdb_hash_functions.rb
@@ -0,0 +1,15 @@
+# -*- encoding: binary -*-
+require 'test/unit'
+$-w = true
+require 'tdb'
+
+class TestHashFunctions < Test::Unit::TestCase
+  include TDB::HashFunctions
+
+  def test_hashes
+    TDB::HASHES.each do |name,_|
+      next if :default == name
+      assert_kind_of Integer, __send__("tdb_hash_#{name}", "hello")
+    end
+  end
+end