Enhan. For SUnit 2.6

R. A. Harmon harmonra at webname.com
Tue Nov 2 21:37:51 UTC 1999


Hi Robert Hirschfeld:

Nice job on the SUnit 2.6 update.

I find the following assertion useful:

!TestCase methodsFor: 'asserting' stamp: 'RAH 10/23/1999 07:01'!
should: aBlock raise: anException
	#chgRAH. "99/10/21 Use ANSI exceptions."

	aBlock
		on: anException
		do: [ :except | ^self].
	TestFailure signal: 'Should have raised ' , anException printString
! !

I lifted it directly from a VSE port of the testing framework I got off the web.

I'm not sure it works like it should in Squeak.  I'm still struggling to get
a handle on exception handling.

Please let me know if it's flawed.

Bye,


--
Richard A. Harmon          "The only good zombie is a dead zombie"
harmonra at webname.com           E. G. McCarthy
Spencer, Iowa





More information about the Squeak-dev mailing list