summaryrefslogtreecommitdiff
path: root/jni/ruby/test/logger/test_severity.rb
blob: 045461caa2bab546e6cadaadbbd961719a70c969 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# coding: US-ASCII
require 'test/unit'
require 'logger'

class TestLoggerSeverity < Test::Unit::TestCase
  def test_enum
    logger_levels = Logger.constants
    levels = ["WARN", "UNKNOWN", "INFO", "FATAL", "DEBUG", "ERROR"]
    Logger::Severity.constants.each do |level|
      assert(levels.include?(level.to_s))
      assert(logger_levels.include?(level))
    end
    assert_equal(levels.size, Logger::Severity.constants.size)
  end
end