Kernel Toolkit 7.3 APIs Banner
Office of Information and Technology (OIT) Banner
[skip navigation]

$$ISUTEST^XTMUNIT(): Evaluate if Unit Test is Running

Reference Type: N/A; Not callable from outside a unit test, Category: Toolkit—M Unit Utility, ICR#: N/A

Description

The $$ISUTEST^XTMUNIT extrinsic function is used to evaluate if a unit test is currently running. If a test is running, it returns a value of 1; otherwise, it returns a value of zero (0). This can be used to select code to be run based on whether it is currently being tested (or something else that calls it is being tested).

NOTE: None of the M Unit Utility Application Programming Interfaces (APIs), extrinsic functions, or sections of code in the M Unit are callable from outside a unit test, but are all part of a unit test. M UNIT is a self-contained application.

REF: For an overview and more details of the M Unit Utility, see the "Toolkit—M Unit Utility" section in the Kernel 8.0 & Kernel Toolkit 7.3 Developer's Guide.

Format

  S X=$$ISUTEST^XTMUNIT

Input Parameters

none.

 

Output

returns:

Returns:

  • 1—If a test is running.

  • Zero (0)—If a test is not running.