[Groonga-commit] ranguba/rroonga at 548f046 [master] test: add tests of Groonga::Type for tokenizers

Back to archive index

Masafumi Yokoyama null+****@clear*****
Thu Apr 2 16:26:27 JST 2015


Masafumi Yokoyama	2015-04-02 16:26:27 +0900 (Thu, 02 Apr 2015)

  New Revision: 548f0468fad2aa26ce0740b3c7326a2b4c5d1ea8
  https://github.com/ranguba/rroonga/commit/548f0468fad2aa26ce0740b3c7326a2b4c5d1ea8

  Merged 4a12980: Merge pull request #73 from ranguba/add-tests-of-type-for-tokenizers

  Message:
    test: add tests of Groonga::Type for tokenizers

  Modified files:
    test/test-type.rb

  Modified: test/test-type.rb (+23 -0)
===================================================================
--- test/test-type.rb    2015-04-02 12:28:42 +0900 (5ac4204)
+++ test/test-type.rb    2015-04-02 16:26:27 +0900 (4dea2d9)
@@ -1,4 +1,5 @@
 # Copyright (C) 2009-2012  Kouhei Sutou <kou �� clear-code.com>
+# Copyright (C) 2015  Masafumi Yokoyama <yokoyama �� clear-code.com>
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -133,4 +134,26 @@ class TypeTest < Test::Unit::TestCase
     assert_equal(expected_name,
                  type ? type.name : type)
   end
+
+  class TokenizerTest < self
+    def test_delimit
+      assert_equal_type("TokenDelimit", Groonga::Type::DELIMIT)
+    end
+
+    def test_unigram
+      assert_equal_type("TokenUnigram", Groonga::Type::UNIGRAM)
+    end
+
+    def test_bigram
+      assert_equal_type("TokenBigram", Groonga::Type::BIGRAM)
+    end
+
+    def test_trigram
+      assert_equal_type("TokenTrigram", Groonga::Type::TRIGRAM)
+    end
+
+    def test_mecab
+      assert_equal_type("TokenMecab",  Groonga::Type::MECAB)
+    end
+  end
 end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index