Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_md5.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mp_md5.sas macro
4
5 <h4> SAS Macros </h4>
6 @li mp_md5.sas
7 @li mp_assert.sas
8 @li mp_assertscope.sas
9
10**/
11%global hash1 hash2 hash3;
12
13%mp_assertscope(SNAPSHOT)
14data work.test1 /nonote2err;
15 c1='';
16 c2=repeat('x',32767);
17 c3=' f';
18 n1=.a;
19 n2=.;
20 n3=1.0000000001;
21 hash=%mp_md5(cvars=c1 c2 c3,nvars=n1 n2 n3);
22 call symputx('hash1',hash);
23 n1=.b;
24 hash=%mp_md5(cvars=c1 c2 c3,nvars=n1 n2 n3);
25 call symputx('hash2',hash);
26 c3='f';
27 hash=%mp_md5(cvars=c1 c2 c3,nvars=n1 n2 n3);
28 call symputx('hash3',hash);
29run;
30%mp_assertscope(COMPARE,ignorelist=HASH1 HASH2 HASH3)
31
32%mp_assert(
33 iftrue=("&hash1" ne "&hash2"),
34 desc=Checking first hash diff,
35 outds=work.test_results
36)
37%mp_assert(
38 iftrue=("&hash2" ne "&hash3"),
39 desc=Checking first hash diff,
40 outds=work.test_results
41)