← index

Test

inherits Object · mixes in BuiltinAssertions, IterateAssertions · defined at test.qn:282

One test: a named method (declared with TestSuite#test:) that runs with the Test itself as receiver, so the body's bare .is:... / .does:... sends land on the mixed-in assertion vocabulary (BuiltinAssertions, IterateAssertions) and accumulate TestAssertionResults here.

Instance methods

addResult:TestAssertionResult

File one assertion's result — the sink the BuiltinAssertions mixin requires of its host. Answers the result.

test.qn:297

elapsed

The sum of the assertions' own check times, in microseconds.

test.qn:312

failures

The assertion results recorded so far that failed.

test.qn:310

init:Method

Internal: wrap the test Method; its selector becomes the test's name. TestSuite#test: is the constructor's call site.

test.qn:288

name

The test's name: its method's selector.

test.qn:303

passes

The assertion results recorded so far that passed.

test.qn:308

reporter

The reporter of the run in progress (set by run:); assertions notify it as they start and finish.

test.qn:306

run:

Run the test method with this Test as the receiver, timing the whole body; answers a TestResult summarizing the recorded assertions.

test.qn:322

s

A Test prints as its name.

test.qn:318

wallElapsed

Wall-clock time of the whole test method run, in microseconds — includes the work between assertions, unlike elapsed.

test.qn:315