about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-02 14:14:12 -0800
committerEric Wong <normalperson@yhbt.net>2010-12-02 14:14:12 -0800
commitcd3d6d573985cac087bd51f44bd8ad87b9e4e429 (patch)
treeb4c3f7b28e4643c9cdfdd75fd036def2bd7dc1ba /test
parentedb517aee23616ee1842148fb7e9afc7aebc6139 (diff)
downloadruby-tdb-cd3d6d573985cac087bd51f44bd8ad87b9e4e429.tar.gz
We still need a lot of work in this area, but this is better
than nothing.
Diffstat (limited to 'test')
-rw-r--r--test/test_tdb.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_tdb.rb b/test/test_tdb.rb
index 188e219..bd25203 100644
--- a/test/test_tdb.rb
+++ b/test/test_tdb.rb
@@ -257,4 +257,14 @@ class TestTdb < Test::Unit::TestCase
     assert Process.waitpid2(pid)[1].success?
     assert_equal true, @tdb.trylockall
   end
+
+  def test_check_constant_typos
+    names = {}
+    TDB.constants.each { |const| names[const] = TDB.const_get(const) }
+    assert_equal TDB.constants.size, names.size
+
+    values = {}
+    TDB.constants.each { |const| values[TDB.const_get(const)] = const }
+    assert_equal TDB.constants.size, values.size
+  end
 end