Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_testwritespeedlibrary.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mp_testwritespeedlibrary macro
4
5 <h4> SAS Macros </h4>
6 @li mp_testwritespeedlibrary.sas
7 @li mf_existds.sas
8 @li mp_assert.sas
9
10**/
11
12/* 0.002 GB keeps the test to a couple of seconds */
13%mp_testwritespeedlibrary(lib=WORK,size=0.002,outds=work.write_speed)
14
15proc sql noprint;
16 select count(*) into: n_rows from work.write_speed;
17 select count(*) into: n_ok from work.write_speed
18 where lib='WORK' and duration_seconds ne . and duration_seconds >= 0;
19quit;
20
21%mp_assert(
22 iftrue=(%mf_existds(work.write_speed)=1 and &n_rows=1),
23 desc=Checking that one result row is written,
24 outds=work.test_results
25)
26
27%mp_assert(
28 iftrue=(&n_ok=1),
29 desc=Checking that the library name and a non missing duration are reported,
30 outds=work.test_results
31)