Class AssertDoesNotThrowExprGenerator

All Implemented Interfaces:
Function<EK9Parser.AssertDoesNotThrowExpressionContext, List<IRInstr>>

public final class AssertDoesNotThrowExprGenerator extends AbstractAssertExprGenerator implements Function<EK9Parser.AssertDoesNotThrowExpressionContext, List<IRInstr>>
IR Generation for the assertDoesNotThrow expression.

Generates ASSERT_DOES_NOT_THROW opcode for test assertions that expect no exception.

Grammar: assertDoesNotThrowExpression: ASSERT_DOES_NOT_THROW LPAREN expression RPAREN

Semantics:

  • Evaluates the expression within a try block
  • If no exception thrown, assertion passes (returns Void)
  • If any exception thrown, throws AssertionError with exception details

Used primarily in statement form: assertDoesNotThrow(safeOperation())