mirror of
https://github.com/sasjs/core.git
synced 2026-01-08 10:00:04 +00:00
feat: new mcf_init.sas macro to handle function compilation tracking (and associated test). Further updates to support mp_stackdiffs test results so far
This commit is contained in:
46
tests/crossplatform/mcf_init.test.sas
Normal file
46
tests/crossplatform/mcf_init.test.sas
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
@file
|
||||
@brief Testing mcf_init.sas macro
|
||||
|
||||
<h4> SAS Macros </h4>
|
||||
@li mcf_init.sas
|
||||
@li mp_assert.sas
|
||||
|
||||
**/
|
||||
|
||||
%mp_assert(
|
||||
iftrue=(%mcf_init(test)=0),
|
||||
desc=Check if new func returns 0
|
||||
)
|
||||
%mp_assert(
|
||||
iftrue=(&syscc=0),
|
||||
desc=No errs on basic invocation
|
||||
)
|
||||
%mp_assert(
|
||||
iftrue=(%mcf_init(test)=1),
|
||||
desc=Check if second invocation returns 1
|
||||
)
|
||||
%mp_assert(
|
||||
iftrue=(&syscc=0),
|
||||
desc=No errs on second invocation
|
||||
)
|
||||
%mp_assert(
|
||||
iftrue=(%mcf_init(test2)=0),
|
||||
desc=Check if new invocation returns 0
|
||||
)
|
||||
%mp_assert(
|
||||
iftrue=(%mcf_init(test2)=1),
|
||||
desc=Check if second new invocation returns 1
|
||||
)
|
||||
%mp_assert(
|
||||
iftrue=(%mcf_init(test)=1),
|
||||
desc=Check original returns 1
|
||||
)
|
||||
%mp_assert(
|
||||
iftrue=(%mcf_init(t)=0),
|
||||
desc=Check subset returns 0
|
||||
)
|
||||
%mp_assert(
|
||||
iftrue=(&syscc=0),
|
||||
desc=No errs at end
|
||||
)
|
||||
31
tests/crossplatform/mf_getfilesize.test.sas
Normal file
31
tests/crossplatform/mf_getfilesize.test.sas
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
@file
|
||||
@brief Testing mf_getfilesize macro
|
||||
|
||||
<h4> SAS Macros </h4>
|
||||
@li mf_getfilesize.sas
|
||||
@li mp_assert.sas
|
||||
@li mp_assertscope.sas
|
||||
|
||||
**/
|
||||
|
||||
data test;
|
||||
x=1;
|
||||
run;
|
||||
|
||||
%mp_assertscope(SNAPSHOT)
|
||||
%put %mf_getfilesize(libds=work.test)
|
||||
%mp_assertscope(COMPARE)
|
||||
|
||||
%mp_assert(
|
||||
iftrue=(&syscc=0),
|
||||
desc=Checking syscc,
|
||||
outds=work.test_results
|
||||
)
|
||||
|
||||
%put %mf_getfilesize(libds=test)
|
||||
%mp_assert(
|
||||
iftrue=(&syscc=0),
|
||||
desc=Checking syscc with one level name,
|
||||
outds=work.test_results
|
||||
)
|
||||
@@ -32,7 +32,9 @@ data work.orig work.deleted work.changed work.appended;
|
||||
else stop;
|
||||
run;
|
||||
|
||||
%mp_storediffs(sashelp.electric,work.orig,CUSTOMER YEAR
|
||||
%mp_storediffs(sashelp.electric
|
||||
,work.orig
|
||||
,CUSTOMER YEAR
|
||||
,delds=work.deleted
|
||||
,modds=work.changed
|
||||
,appds=work.appended
|
||||
|
||||
Reference in New Issue
Block a user