> There are inconsistencies that bother me.
>
> * TestCase>>assert: in most Smalltalks accepts only a boolean. In  
> Pharo,
> it accepts either a boolean or a block. This makes tests less  
> portable.

+1

> * TestCase>>assert:equals: (a very useful method) does not accept a
> block. Anyone used to giving blocks to #assert: would probably expect
> this method to accept a block.

+1 consistency is nice.

> * Object assert: accepts a boolean or a block. I don't know of any
> standard for this.

me neither

> * BlockClosure>>assert does not take any arguments, so I feel it is  
> very
> clean.

+1

> Proposed changes: (based on earlier discussion plus personal opinion)
>
> TestCase>>assert: should only accept a boolean. This brings
> compatibility with other Smalltalks, and consistency with
> TestCase>>assert:equals:.

+ 1

> Object>>assert: should be removed/deprecated in favor of
> BlockClosure>>assert. This removes confusion with TestCase>>assert:.

deprecation!

> Object>>assert:description: and Object>>assert:descriptionBlock:  
> should
> be removed/deprecated in favor of (new)
> BlockClosure>>assertWithDescription:, which accepts either a block  
> or a
> string. This provides convenient invariant and pre/post condition  
> testing.

Let us do that.
Any taker?

Stef
>
>
> Opinions?
>
> -Martin
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to