GNU Smalltalk Unit Level Testing

212,873pages on
this wiki
Add New Page
Add New Page Discuss this page0

A port of Kent Beck's SUnit is delivered with GNU Smalltalk, a brief overview could also be found in the info-documentation (Node SUnit, under Packages).

Additional but squeak-centric information can be found in Eng-Art8-SUnit-V1.pdf

To use SUnit in GNU Smalltalk, you'll have to file in SUnit, if not done already.

PackageLoader fileInPackage: 'SUnit'!

You'll maybe find

MyTest buildSuiteFromLocalSelectors run printNl!

useful, as it creates a suite containing all tests of MyTest? (methods beginning with test).

If the test fails, you should evaluate

(MyTest new) setUp; testMyFailingTest; tearDown!

as it gives the reason in the displayed walkback.

Also on Fandom

Random wikia