Bad Plan! Bad!

0 views
Skip to first unread message

Marvin Humphrey

unread,
Aug 22, 2007, 9:47:03 PM8/22/07
to jsan-a...@googlegroups.com
David,

One test was never reached in tests/bad_plan.js because it was
located in a catch block and the expected exception was never
thrown. The test actually would have failed, but its absence was
never reported because of the underlying problem I'm trying to fix
with Test.Harness not paying attention to the plan.

The test had to do with validation of the args presented to plan(),
and was failing because that validation had been commented out. I
originally opted to mark that test a TODO, but I've now gone and
turned the validation back on, with code in there to accommodate (ill-
advised) mods to Object.prototype.

This patch should be applied after the last one.

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/

bad_plan.diff

David E. Wheeler

unread,
Aug 28, 2007, 1:41:54 PM8/28/07
to jsan-a...@googlegroups.com
On Aug 22, 2007, at 18:47, Marvin Humphrey wrote:

> The test had to do with validation of the args presented to plan(),
> and was failing because that validation had been commented out. I
> originally opted to mark that test a TODO, but I've now gone and
> turned the validation back on, with code in there to accommodate (ill-
> advised) mods to Object.prototype.

Nice, thanks Marvin.

BTW, there are a lot of JS libraries that modify core prototypes
(like prototyp.js). It's de rigeur in the Ruby community, and a lot
of that has flowed into JavaScript. I agree that it's ill-advised,
though it can be very useful. See the list history for a lively
discussion of this topic.

At any rate, we have have to assume that changes to Object.prototype
may in fact have been made, and just do our best despite them. Thanks
for that patch, it looks like it helps.

BTW, be sure to add your changes to Changes and give yourself credit.
And let me know when it's ready for a new release.

Best,

David

Reply all
Reply to author
Forward
0 new messages