1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-04 16:10:06 +00:00

feat: new macro to determine if a macro variable value is an integer - mf_isint (and associated test)

This commit is contained in:
munja
2021-12-13 18:36:22 +00:00
parent 0ce7efee3e
commit 8b5238230b
3 changed files with 98 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
/**
@file
@brief Testing mf_isint macro
<h4> SAS Macros </h4>
@li mf_isint.sas
@li mp_assert.sas
**/
%mp_assert(
iftrue=(
"%mf_isint(1)"="1"
),
desc=Checking basic mf_isint(1),
outds=work.test_results
)
%mp_assert(
iftrue=(
"%mf_isint(1.1)"="0"
),
desc=Checking basic mf_isint(1.1),
outds=work.test_results
)
%mp_assert(
iftrue=(
"%mf_isint(-1)"="1"
),
desc=Checking mf_isint(-1),
outds=work.test_results
)