[Groonga-commit] groonga/grntest at dbe8647 [master] test executor: add tests for error_log_level?

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Aug 12 12:49:24 JST 2013


Kouhei Sutou	2013-08-12 12:49:24 +0900 (Mon, 12 Aug 2013)

  New Revision: dbe86476f23f61051c976664e460a910a248e65d
  https://github.com/groonga/grntest/commit/dbe86476f23f61051c976664e460a910a248e65d

  Message:
    test executor: add tests for error_log_level?

  Added files:
    test/executors/test-base-executor.rb

  Added: test/executors/test-base-executor.rb (+42 -0) 100644
===================================================================
--- /dev/null
+++ test/executors/test-base-executor.rb    2013-08-12 12:49:24 +0900 (a1b7dc2)
@@ -0,0 +1,42 @@
+# Copyright (C) 2013  Kouhei Sutou <kou �� clear-code.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+require "grntest/executors/base-executor"
+
+class TestBaseExecutor < Test::Unit::TestCase
+  def setup
+    @executor = Grntest::Executors::BaseExecutor.new
+    @context =****@execu*****
+  end
+
+  class TestErrorLog < self
+    data("emergency" => "E",
+         "alert"     => "A",
+         "critical"  => "C",
+         "error"     => "e")
+    def test_error_log_level(level)
+      assert_true(@executor.send(:error_log_level?, level))
+    end
+
+    data("warning" => "w",
+         "notice"  => "n",
+         "info"    => "i",
+         "debug"   => "d",
+         "dump"    => "-")
+    def test_not_error_log_level(level)
+      assert_false(@executor.send(:error_log_level?, level))
+    end
+  end
+end
-------------- next part --------------
HTML����������������������������...
Download 



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