8 # ======================================================================
10 # ======================================================================
17 {print "ok $n\n";} else {print "not ok $n\n";}
19 eval { $set->DESTROY(); };
20 if ($@ =~ /Can't call method "DESTROY" without a package or object reference/)
21 {print "ok $n\n";} else {print "not ok $n\n";}
23 eval { Bit::Vector::DESTROY($set); };
25 {print "ok $n\n";} else {print "not ok $n\n";}
29 if (ref($set) eq 'SCALAR')
30 {print "ok $n\n";} else {print "not ok $n\n";}
32 eval { $set->DESTROY(); };
33 if ($@ =~ /Can't call method "DESTROY" on unblessed reference/)
34 {print "ok $n\n";} else {print "not ok $n\n";}
36 eval { Bit::Vector::DESTROY($set); };
38 {print "ok $n\n";} else {print "not ok $n\n";}
42 bless($set, 'Bit::Vector');
43 if (ref($set) eq 'Bit::Vector')
44 {print "ok $n\n";} else {print "not ok $n\n";}
46 eval { $set->DESTROY(); };
48 {print "ok $n\n";} else {print "not ok $n\n";}
50 eval { Bit::Vector::DESTROY($set); };
52 {print "ok $n\n";} else {print "not ok $n\n";}
54 $set = new Bit::Vector(1);
55 if (ref($set) eq 'Bit::Vector')
56 {print "ok $n\n";} else {print "not ok $n\n";}
58 eval { $set->DESTROY(); };
60 {print "ok $n\n";} else {print "not ok $n\n";}
62 if (ref($set) eq 'Bit::Vector')
63 {print "ok $n\n";} else {print "not ok $n\n";}
65 if (defined(${$set}) && (${$set} == 0))
66 {print "ok $n\n";} else {print "not ok $n\n";}
68 eval { $set->DESTROY(); };
70 {print "ok $n\n";} else {print "not ok $n\n";}
74 {print "ok $n\n";} else {print "not ok $n\n";}