Class DeclaredTestExitCodeOf

java.lang.Object
org.ek9lang.compiler.common.DeclaredTestExitCodeOf
All Implemented Interfaces:
Function<ISymbol,String>

public final class DeclaredTestExitCodeOf extends Object implements Function<ISymbol,String>
The exit code a test DECLARED with "EXIT:<n>", or null when it declared none (IsTestProgram has the encoding contract). Hold an instance.

For callers rewriting a directive line: they must carry a declared expectation over, and must not invent one (EXIT:0 written where nothing was declared is a change of text, if not of meaning). Callers deciding a test's outcome use ExpectedTestExitCodeOf.

  • Constructor Details

    • DeclaredTestExitCodeOf

      public DeclaredTestExitCodeOf()
  • Method Details

    • apply

      public String apply(ISymbol symbol)
      The declared exit code.
      Specified by:
      apply in interface Function<ISymbol,String>
      Parameters:
      symbol - any symbol, or null
      Returns:
      the declared code as its decimal text, or null