25 %MACRO assertPerformance(i_expected=
26 ,i_desc = Check
for run time
31 %IF &g_inTestcase EQ 1 %THEN %DO;
34 %ELSE %IF &g_inTestcase NE 2 %THEN %DO;
35 %PUT &g_error.(SASUNIT): assert must be called after initTestcase;
39 %LOCAL l_casid l_result l_errMsg;
43 SELECT max(cas_id) INTO :l_casid FROM target.cas WHERE cas_scnid=&g_scnid;
45 %LET l_casid = &l_casid;
46 %IF &l_casid = . OR &l_casid = %THEN %DO;
47 %PUT &g_error.(SASUNIT): assert must not be called before initTestcase;
52 SELECT cas_end - cas_start
57 AND cas_id = &l_casid.;
61 %LET l_result = %SYSEVALF((NOT(&l_cas_runtime <= &i_expected))*2);
64 %LET l_errMsg=%bquote(Expected run time was &i_expected. s, but test case took &l_cas_runtime. s!);
66 %_asserts(i_type = assertPerformance
67 ,i_expected = &i_expected
68 ,i_actual = &l_cas_runtime
73 %MEND assertPerformance;