[tap-l] TAP, and "Indexes" for Items.

Shlomi Fish shlomif at iglu.org.il
Wed May 2 12:42:07 BST 2007


Hi all!

I apologise if this was discussed in these forums before, but I wish to 
discuss it here, too.

I've been thinking about this - let's suppose we are testing something on a 
collection of objects, like:

<<<<<<<<<<<<
my %people =
(
	"schwern" => { 'pants' => "fishpants" },
	"tyler_macdonald" => { 'pants' => "corduroys", },
	"skud" => { 'pants' => "skirt", },
	"shlomif" => { 'pants' => "shorts", },
)
>>>>>>>>>>>>

Etc. We instantiate objects out of them and check them:

<<<<<<<<<
foreach my $name (sort { $a cmp $b } keys(%people))
{
	my $person_obj = Person->new({name => $name, %{$people{$name}});

	Do some tests.

	# TEST*$num_persons
	ok ($person_obj->has_pants(), "Testing person \"$name\".");
}
>>>>>>>>>>>>>

Now, wouldn't it be a good idea if the TAP analyser can tell what is the key 
of the object being tested? So it will know that it is "schwern" or "skud" or 
whatever?

So what I imagined is a certain path to the object, which can contain string 
keys, integral indices, or perhaps even XPath paths or other type of keys. 
This will allow an identification of the object.

What do you think?

Regards,

	Shlomi Fish (Wearing shorts again)

---------------------------------------------------------------------
Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://www.shlomifish.org/

If it's not in my E-mail it doesn't happen. And if my E-mail is saying
one thing, and everything else says something else - E-mail will conquer.
    -- An Israeli Linuxer


More information about the tap-l mailing list