
### -- t/00base.t -- autogenerated from xilpl (22/04/2001) -------###

use strict;
my $loaded = 0;

#- test loading ----------------------------------------------------#
BEGIN {
    $|++;
    print "1..10\n";
}
END {
    print "not ok 1\n" unless $loaded;
}

use CSS::SAC qw();
$loaded = 1;
print "ok 1\n";


#- test misc basic stuff -------------------------------------------#

my $sac = CSS::SAC->new;
print 'not ' if ref $sac ne 'CSS::SAC';
print "ok 2\n";

print 'not ' if $sac->ParserVersion ne 'CSS3';
print "ok 3\n";

print 'not ' if ref $sac->ConditionFactory ne 'CSS::SAC::ConditionFactory';
print "ok 4\n";

print 'not ' if ref $sac->SelectorFactory ne 'CSS::SAC::SelectorFactory';
print "ok 5\n";

print 'not ' if ref $sac->ErrorHandler ne 'CSS::SAC::DefaultErrorHandler';
print "ok 6\n";


#- test some constants here and there ------------------------------#

use CSS::SAC::Selector	qw(:constants);
print 'not ' if UNKNOWN_SELECTOR != 1 or NEGATIVE_SELECTOR != 10;
print "ok 7\n";

use CSS::SAC::LexicalUnit	qw(:constants);
print 'not ' if GRADIAN != 10 or OPERATOR_MULTIPLY != 27;
print "ok 8\n";

use CSS::SAC::Condition	qw(:constants);
print 'not ' if CLASS_CONDITION != 5 or IS_ROOT_CONDITION != 19;
print "ok 9\n";

use CSS::SAC::Selector::Sibling	qw(:constants);
print 'not ' if TEXT_NODE != 3 or DOCUMENT_TYPE_NODE != 10;
print "ok 10\n";
