Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
mp_assert.sas File Reference

Generic assertion. More...

Go to the source code of this file.

Detailed Description

Useful in the context of writing sasjs tests. The results of the test are appended to the &outds. table.

Example usage:

%mp_assert(iftrue=(1=1),
  desc=Obviously true
)

%mp_assert(iftrue=(1=0),
  desc=Will fail
)
Parameters
[in]iftrue=(1=1) A condition where, if true, the test is a PASS. Else, the test is a fail.
[in]desc=(Testing observations) The user provided test description
[out]outds=(work.test_results) The output dataset to contain the results. If it does not exist, it will be created, with the following format:
TEST_DESCRIPTION:$256 TEST_RESULT:$4 TEST_COMMENTS:$256
User Provided description PASS Column &inds contained ALL columns
Version
9.2
Author
Allan Bowe

Definition in file mp_assert.sas.