about summary refs log tree commit homepage
path: root/test/test_tdb_hash_functions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_tdb_hash_functions.rb')
-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