Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[CVS ci] diamond class hierarchy

12 views
Skip to first unread message

Leopold Toetsch

unread,
Apr 4, 2004, 4:28:57 AM4/4/04
to P6I
Object gurus, please have a look at t/pmc/object-meths_17. Is the code
ok? Is it failing because init order is really wrong?

BTW I tried to add this test as a TODO but this seems not to work.

leo

Chromatic

unread,
Apr 7, 2004, 2:38:24 AM4/7/04
to Leopold Toetsch, P6I

That's odd. If I uncomment line 467 ( local $TODO = "wrong init
order?"; ), it prints the proper TODO information:

not ok 17 - constructor - diamond parents # TODO wrong init order?
# Failed (TODO) test (t/pmc/object-meths.t at line 469)

At one point TODO didn't work in Parrot::Test, but I remember patching
it at least once. I have no local CVS changes anywhere under lib/.

-- c

Leopold Toetsch

unread,
Apr 7, 2004, 3:23:29 AM4/7/04
to Chromatic, perl6-i...@perl.org
Chromatic <chro...@wgz.org> wrote:
> On Sun, 2004-04-04 at 00:28, Leopold Toetsch wrote:

>> Object gurus, please have a look at t/pmc/object-meths_17. Is the code
>> ok? Is it failing because init order is really wrong?
>>
>> BTW I tried to add this test as a TODO but this seems not to work.

> That's odd. If I uncomment line 467 ( local $TODO = "wrong init
> order?"; ), it prints the proper TODO information:

> not ok 17 - constructor - diamond parents # TODO wrong init order?
> # Failed (TODO) test (t/pmc/object-meths.t at line 469)

$ perl -Ilib t/pmc/object-meths.t
1..17
...


not ok 17 - constructor - diamond parents # TODO wrong init order?
# Failed (TODO) test (t/pmc/object-meths.t at line 469)

...

$ perl -Ilib t/harness t/pmc/o*.t
t/pmc/object-meths....ok
t/pmc/objects.........ok
t/pmc/orderedhash.....ok
All tests successful.
Files=3, Tests=72, 2 wallclock secs ( 1.15 cusr + 0.60 csys = 1.75 CPU)

It's suboptimal that the summary doesn't cover the TODO test. There is no
sign that something is wrong.

> -- c

leo

Chromatic

unread,
Apr 7, 2004, 12:07:39 PM4/7/04
to l...@toetsch.at, perl6-i...@perl.org
On Wed, 2004-04-07 at 00:23, Leopold Toetsch wrote:

> $ perl -Ilib t/pmc/object-meths.t
> 1..17
> ...
> not ok 17 - constructor - diamond parents # TODO wrong init order?
> # Failed (TODO) test (t/pmc/object-meths.t at line 469)
> ...
>
> $ perl -Ilib t/harness t/pmc/o*.t
> t/pmc/object-meths....ok
> t/pmc/objects.........ok
> t/pmc/orderedhash.....ok
> All tests successful.
> Files=3, Tests=72, 2 wallclock secs ( 1.15 cusr + 0.60 csys = 1.75 CPU)
>
> It's suboptimal that the summary doesn't cover the TODO test. There is no
> sign that something is wrong.

That's a longtime feature of Test::Harness. It will report any TODO
tests that unexpectedly succeed:

$ cat todo_tests.pl
#! perl -w

use Test::More tests => 2;

TODO:
{
local $TODO = 'todo these';
ok( 0 );
ok( 1 );
}

$ perl -MTest::Harness -e 'runtests( "todo_tests.pl" )'
todo_tests....ok
1/2 unexpectedly succeeded
All tests successful (1 subtest UNEXPECTEDLY SUCCEEDED).
Files=1, Tests=2, 1 wallclock secs ( 0.05 cusr + 0.01 csys = 0.06
CPU)
$


It's possible to customize this, if you want, or to write a tool looking
for TODO tests, but this is the default, expected behavior.

-- c

Leopold Toetsch

unread,
Apr 7, 2004, 12:23:24 PM4/7/04
to Chromatic, perl6-i...@perl.org
Chromatic <chro...@wgz.org> wrote:

> It's possible to customize this, if you want, or to write a tool looking
> for TODO tests, but this is the default, expected behavior.

I know. But it's more or less useless, when TODO tests are hidden in the
result. No one will look at these tests.

What about a list after the test summary:

TODO bla
TODO foo
...

> -- c

leo

0 new messages