-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Sadly NewTools does not provide any hooks to extend debugger to support new kind of assertion failures. Only basic #assert: logic is supported with very primitive variable analysis:
Context>>findFailedAssertionContextInSenderChain
^ (self findContextSuchThat: [ :ctx |
(ctx hasTemporaryVariableNamed: #actual) and: [
ctx hasTemporaryVariableNamed: #expected ] ]) ifNil: [
StDebuggeAssertionFailureContextNotFound new signal ]which is used from:
StDebuggerInspector>>updateLayoutForContexts: aContext isAssertionFailure: isTopContextFailingAssertion
| assertionResult |
isTopContextFailingAssertion ifFalse: [
currentLayoutSelector = self defaultLayoutSelector ifTrue: [ ^ self ].
self setDefaultLayout.
^self ].
currentLayoutSelector = self assertionLayoutSelector ifTrue: [ ^ self ].
[ assertionResult := aContext findFailedAssertionResultsInSenderChain ]
on: StDebuggeAssertionFailureContextNotFound
do: [ self setDefaultLayout.
^self ].
assertionFailure := StFailingAssertionInspector
diffInspectorsFromActual: assertionResult actual
expected: assertionResult expected
application: self application.
self setAssertionLayoutIt should really lookup the exception and ask exception instance to setup the inspector extension. This requires contribution into NewTools project
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels