← index

TestAssertionResult

inherits Object · defined at test.qn:221

The record of one assertion: the verdict, the #( expected comparison actual ) evidence triple failure messages are built from, timing, and the asserted block's source location. Assertions construct these through BuiltinAssertions#recordResult:evidence:block:; reporters render them.

Instance methods

actual

The actual side of the evidence triple.

test.qn:252

comparison

The comparison word of the evidence triple (e.g. '!=' or 'not <').

test.qn:250

elapsed

How long the assertion's check took, in microseconds.

test.qn:243

evidence

The #( expected comparison actual ) triple failure messages are built from; expected / comparison / actual read its parts.

test.qn:246

expected

The expected side of the evidence triple.

test.qn:248

init:

Internal: store the fields captured by new:'s builder block; recordResult:evidence:block: is the one constructor call site.

test.qn:224

location

The asserted block's raw source location as #( file line column ), via Block#source; nil when unavailable.

test.qn:241

locationColumn

The source column of the asserted block, reported 1-indexed to match the VM's error output; '?' when unavailable.

test.qn:261

locationFile

The source file of the asserted block; '?' when no location is available, so the reporter always has something to show.

test.qn:256

locationLine

The source line of the asserted block; '?' when unavailable.

test.qn:258

name

The asserted block's name, or '{code}' when the block is anonymous.

test.qn:236

passed?

true when the assertion held.

test.qn:238

s

Debug rendering: test, verdict, evidence, timing and location in one line.

test.qn:265

test

The Test this assertion ran inside.

test.qn:234