Skip to content

Commit

Permalink
Test core log level
Browse files Browse the repository at this point in the history
  • Loading branch information
ambs committed Jun 2, 2011
1 parent 0d70c98 commit 48bde2a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion t/11_logger/01_abstract.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use Test::More tests => 16, import => ['!pass'];
use Test::More tests => 23, import => ['!pass'];
use strict;
use warnings;

Expand All @@ -17,18 +17,29 @@ foreach my $method (qw(_log debug warning error)) {
like $@, qr/_log not implemented/, "$method is a virtual method";
}


# core
setting log => 'core';
ok $l->_should('core'), "core level accepted";
ok $l->_should('debug'), "debug level accepted";
ok $l->_should('warning'), "warning level accepted";
ok $l->_should('error'), "error level accepted";

# debug
setting log => 'debug';
ok !$l->_should('core'), "core level not accepted";
ok $l->_should('debug'), "debug level accepted";
ok $l->_should('warning'), "warning level accepted";
ok $l->_should('error'), "error level accepted";

setting log => 'warning';
ok !$l->_should('core'), "core level not accepted";
ok !$l->_should('debug'), "debug level not accepted";
ok $l->_should('warning'), "warning level accepted";
ok $l->_should('error'), "error level accepted";

setting log => 'error';
ok !$l->_should('core'), "core level not accepted";
ok !$l->_should('debug'), "debug level not accepted";
ok !$l->_should('warning'), "warning level not accepted";
ok $l->_should('error'), "error level accepted";
Expand Down

0 comments on commit 48bde2a

Please sign in to comment.