develooper Front page | perl.perl5.porters | Postings from January 2005

tests for attributes

Thread Next
Nicholas Clark
January 1, 2005 04:36
tests for attributes
Message ID:
t/op/attrs.t exists, describing itself as

# Regression tests for and the C< : attrs> syntax.

However, it doesn't seem to a fantastic job of code coverage. For example,
if you look at modify_SV_attributes in
it's called 78 times, but 0% of the case statements are triggered. This
doesn't seem good.

As far as I can tell, the route to modify_SV_attributes is from
XS_attributes__modify_attrs, exposed at perl level as
&attributes::_modify_attrs, called via attributes::import.

Does anyone understand this stuff? Or am I the only one who is perturbed
by all this?

Part of the reason I'm curious is because I've noticed this bug:

	case SVt_PVCV:
	    switch ((int)len) {
	    case 6:
		switch (*name) {
		case 'a':
		    if (strEQ(name, "assertion")) {

("assertion" clearly isn't length 6, so this will never be true)
and I'm wondering why no-one else has ever encountered it.

Nicholas Clark

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About