Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrating assertion rewriting properly #580

Conversation

adri09070
Copy link
Contributor

Based on: https://github.com/dvmason/AssertValueDebugger but more generic because it allows to generate/rewrite not only assertions but actually any type of code.

When StDebugger>>selectedCodeRangeForContext: is called, it makes a dispatch on the exception to know if a specific selection interval should be used or if the default selection interval should be highlighted. Subclasses of StGenerateCode (which is an exception) suggest a template method that rewrites a part of code before returning the selection interval for this piece of code. Subclasses of StGenerateCode have just to define which piece of code should be rewritten AND what piece of code should replace the rewritten piece of code.

It works in the debugger but my unit test fails for now because:

  • I don't manage to reset the source code of the modified method in #tearDown
  • I willingly raise a TestFailure in my test and I want to catch it but I don't manage to do so. I suppose I need to raise another exception (it's not important for the logic of the test)

…cording to context, interface called on the debugger GUI...)
…reasons:

- I don't manage to reset the source code of the modifier method in #tearDown
- I willingly raise a TestFailure in my test and I want to catch it but I don't manage to do so
@adri09070 adri09070 added enhancement New feature or request debugger need more work This needs to be improved before being considered labels Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugger enhancement New feature or request need more work This needs to be improved before being considered
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant