19.11.2014 Views

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

The Fortress Language Specification - CiteSeerX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 30<br />

Tests<br />

30.1 <strong>The</strong> Object <strong>Fortress</strong>.Standard.TestSuite<br />

An instance of the object TestSuite contains a set of test functions that can all be called by invoking the method run :<br />

test object TestSuite(testFunctions = {})<br />

add(f: () → ()):()<br />

run():()<br />

end<br />

30.1.1 add(f:() → ()):()<br />

<strong>The</strong> add method adds a given test function to the testFunctions field of this object.<br />

30.1.2 run():()<br />

<strong>The</strong> run method calls each test function in the testFunctions field of this object. Note that all tests in a TestSuite<br />

are run in parallel.<br />

30.2 Test Functions<br />

30.2.1 test fail(message: String):()<br />

<strong>The</strong> helper function fail displays the error message provided and terminates execution of the enclosing test.<br />

211

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!