diff options
Diffstat (limited to 'jni/ruby/test/logger/test_severity.rb')
-rw-r--r-- | jni/ruby/test/logger/test_severity.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/jni/ruby/test/logger/test_severity.rb b/jni/ruby/test/logger/test_severity.rb new file mode 100644 index 0000000..045461c --- /dev/null +++ b/jni/ruby/test/logger/test_severity.rb @@ -0,0 +1,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 |