#!./perl -w
$|=1;
chdir 't' if -d 't';
print "1..0\n";
exit 0;
}
}
);
my $t = 1;
# --- opset_to_ops and opset
print @
empty_l ==
0 ?
"ok $t\n" :
"not ok $t\n"; $t++;
print "@full_l1" eq "@full_l2" ?
"ok $t\n" :
"not ok $t\n"; $t++;
print @
empty_l ==
0 ?
"ok $t\n" :
"not ok $t\n"; $t++;
print "@full_l1" eq "@full_l3" ?
"ok $t\n" :
"not ok $t\n"; $t++;
print $s1 eq $s2 ?
"not ok $t\n" :
"ok $t\n"; ++$t;
print $s1 eq $s3 ?
"ok $t\n" :
"not ok $t\n"; ++$t;
# --- define_optag
print eval { opset(':_tst_') } ? "not ok $t\n" : "ok $t\n"; ++$t; print eval { opset(':_tst_') } ? "ok $t\n" : "not ok $t\n"; ++$t;
# --- opdesc and opcodes
print opdesc("gv") eq "glob value" ? "ok $t\n" : "not ok $t\n"; $t++; print "@desc" eq "private variable private array private hash stub" ? "ok $t\n" : "not ok $t\n#@desc\n"; $t++;
print opcodes() ? "ok $t\n" : "not ok $t\n"; $t++; print "ok $t\n"; ++$t;
# --- invert_opset
print @o2 == opcodes-3 ? "ok $t\n" : "not ok $t\n"; $t++;
# --- opmask
# --- verify_opset
# --- opmask_add
print eval 'fileno STDOUT' ? "not ok $t\n" : "ok $t\n"; $t++; # fail
print $@ =~ /'fileno' trapped/ ? "ok $t\n" : "not ok $t\n# $@\n"; $t++;
# --- check use of bit vector ops on opsets
# Non-negated
print (($s2 ^ $s3) eq opset('padsv','padhv') ? "ok $t\n":"not ok $t\n"); $t++;
# Negated, e.g., with possible extra bits in last byte beyond last op bit. # The extra bits mean we can't just say ~mask eq invert_opset(mask).
print "@o1" eq "@o2" ? "ok $t\n":"not ok $t\n"; $t++;
# --- finally, check some opname assertions