1 conditions define: #AssertionFailed &parents: {DescriptiveError}.
2 AssertionFailed description: 'Assertion Failed'.
4 c@(AssertionFailed traits) signalSaying: description
5 [description ifNil: [c signal] ifNotNil: [resend]].
7 _ assert: m@(Method traits) &description [m do ifFalse: [AssertionFailed signalSaying: description]].
9 _ deny: m@(Method traits) &description [m do ifTrue: [AssertionFailed signalSaying: description]].
11 _ assert: _@False &description [AssertionFailed signalSaying: description].
15 x assert: expr@(Syntax Node traits) &description [x assert: expr evaluate &description: description].
17 node@(Syntax Node traits) assert: expr@(Syntax Node traits)
18 "A macro which (TODO: conditionally) expands into a run-time assertion."
20 Message sending: #assert: to: {node. expr}