Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mf_getkeyvalue.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mf_getkeyvalue macro
4
5 <h4> SAS Macros </h4>
6 @li mf_getkeyvalue.sas
7 @li mp_setkeyvalue.sas
8 @li mp_assert.sas
9 @li mp_assertscope.sas
10
11**/
12
13%mp_setkeyvalue(provnum,22,type=N)
14%mp_setkeyvalue(provchar,somevalue,type=C)
15
16%mp_assertscope(SNAPSHOT)
17%put scope check:%mf_getkeyvalue(provnum);
18%mp_assertscope(COMPARE,
19 desc=Checking that mf_getkeyvalue does not leak scope,
20 outds=work.test_results
21)
22
23%mp_assert(
24 iftrue=(%mf_getkeyvalue(provnum)=22),
25 desc=Checking that a numeric value is returned for a numeric key,
26 outds=work.test_results
27)
28
29%mp_assert(
30 iftrue=(%sysfunc(strip(%mf_getkeyvalue(provchar)))=somevalue),
31 desc=Checking that a character value is returned for a character key,
32 outds=work.test_results
33)