Viewing Failures in sUnit's TestRunner

Anthony Adachi adachipro at yahoo.com
Sat Apr 26 16:32:55 UTC 2003


Hello

Is there a method in sUnit which one can pass expected
and actual results as one can with jUnit? So that I
can compare them in order find out went wrong in an
event of a failure? 

Also, I don't understand how one is suppose to examine
failures in sUnit. When I get a failure the Test
Runner window displays the failing test. However, the
description I passed to assert is not listed. When I
click on one of the listed failing tests a Halt window
pops-up.

The closest thing I could find going through the halt
window was TestRunner>>debugFailureTest:
Which lists various values (result, details, failures,
errors, ect.) none of which contain the description I
passed with the assert message (they only appear to
list the number of failures). 

--This is my unit test which expects the string
'shouting'.
ExampleTest>>testShout

fish := Piexe new.
self assert: (fish shout) = 'shouting' description: ( 
'expected: shouting was:', (fish shout))

--This is the unit undergoing tests which returns
'whisper' as a result of calling shout.
Piexe >>shout

shout
^'whisper'

Thanks,

Anthony

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the Squeak-dev mailing list