Neat test-driven coding trick

Lex Spoon lex at cc.gatech.edu
Mon Jul 22 19:28:24 UTC 2002


danielv at netvision.net.il wrote:
> Probably I'm not the only one that dislikes the tendency of the test
> runner to take two hours to tell me everythings fine.
> 
> Enter the power of InfoStringMorphs. Put this in the comment for the
> test you're working on. Doit. 
> (InfoStringMorph on: [self name, ' ', self suite run printString])
> openInWorld
> 

This is just like UpdatingStringMorph.  I agree that it is wonderful.  I
use it, for example, to show what my current window dimensions are
(useful when developing for an eventual 800x600 release distribution). 
Or for lots of things.

I do wish there was an onBlock: selector instead of just on:selector:. 
I find myself specifying #value as the selector an aweful lot!


Anyway, maybe InfoStringMorph should be phased over into
UpdatingStringMorph, to remove the redundency?


-Lex



More information about the Squeak-dev mailing list