29 %initTestcase(i_object=boxplot.sas, i_desc=standard
case without reference)
30 %boxplot(data=testdata.blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report1.pdf)
31 %assertReport(i_actual=&g_work\report1.pdf, i_expected=,
32 i_desc=please compare chart with specification in source code)
35 %initTestcase(i_object=boxplot.sas, i_desc=standard
case with reference)
36 %boxplot(data=testdata.blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report2.pdf)
37 %assertReport(i_actual=&g_work\report2.pdf, i_expected=&g_refdata\boxplot1.pdf,
38 i_desc=please compare the two charts)
41 %initTestcase(i_object=boxplot.sas, i_desc=%str(standard
case with reference, missing values
for Y ))
43 set testdata.blood_pressure;
48 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report3.pdf)
49 %assertReport(i_actual=&g_work\report3.pdf, i_expected=&g_refdata\boxplot1.pdf,
50 i_desc=%str(please compare the two charts, no changes produced by missing values in the y variable))
51 %assertLogMsg(i_logMsg=%str(NOTE: 240 observation\(s\) contained a MISSING value
for the SBP \* Visit = Med request|NOTE: 240 Beobachtung\(en\) in fehlendem Wert enthalten für den Befehl SBP \* Visit = Med)
52 ,i_desc=regular expression used to support different languages
56 %initTestcase(i_object=boxplot.sas, i_desc=different scaling
for x and y axis)
58 set testdata.blood_pressure;
62 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report4.pdf)
63 %assertReport(i_actual=&g_work\report4.pdf, i_expected=,
64 i_desc=please compare chart with specification in source code)
67 %initTestcase(i_object=boxplot.sas, i_desc=only two visits)
69 set testdata.blood_pressure;
70 where visit in (1, 5);
72 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report5.pdf)
73 %assertReport(i_actual=&g_work\report5.pdf, i_expected=,
74 i_desc=please compare chart with specification in source code)
77 %initTestcase(i_object=boxplot.sas, i_desc=only one visit)
79 set testdata.blood_pressure;
82 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report6.pdf)
83 %assertLogMsg(i_logMsg=ERROR: boxplot: x variable must have at least two values)
84 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report6.pdf)), i_expected=0, i_desc=no report created)
85 %endTestcase(i_assertLog=0)
88 %initTestcase(i_object=boxplot.sas, i_desc=18 visits)
91 testdata.blood_pressure (in=in1)
92 testdata.blood_pressure (in=in2)
93 testdata.blood_pressure (in=in3)
95 if in2 then visit=visit+6;
96 if in3 then visit=visit+12;
98 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report7.pdf)
99 %assertReport(i_actual=&g_work\report7.pdf, i_expected=,
100 i_desc=please compare chart with specification in source code)
103 %initTestcase(i_object=boxplot.sas, i_desc=invalid input data set)
104 %boxplot(data=XXXXX, x=visit, y=sbp, group=med, report=&g_work\report8.pdf)
105 %assertLogMsg(i_logMsg=ERROR: boxplot: Data set XXXXX does not exist)
106 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report8.pdf)), i_expected=0, i_desc=no report created)
107 %endTestcase(i_assertLog=0)
110 %initTestcase(i_object=boxplot.sas, i_desc=input data set missing)
111 %boxplot(data=, x=visit, y=sbp, group=med, report=&g_work\report9.pdf)
112 %assertLogMsg(i_logMsg=ERROR: boxplot: Data set does not exist)
113 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report9.pdf)), i_expected=0, i_desc=no report created)
114 %endTestcase(i_assertLog=0)
117 %initTestcase(i_object=boxplot.sas, i_desc=invalid x variable)
118 %boxplot(data=testdata.blood_pressure, x=visitXXX, y=sbp, group=med, report=&g_work\report10.pdf)
119 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable visitXXX does not exist in data set testdata.blood_pressure)
120 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report10.pdf)), i_expected=0, i_desc=no report created)
121 %endTestcase(i_assertLog=0)
124 %initTestcase(i_object=boxplot.sas, i_desc=x variable missing)
125 %boxplot(data=testdata.blood_pressure, x=, y=sbp, group=med, report=&g_work\report11.pdf)
126 %assertLogMsg(i_logMsg=ERROR: boxplot: X variable not specified)
127 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report11.pdf)), i_expected=0, i_desc=no report created)
128 %endTestcase(i_assertLog=0)
131 %initTestcase(i_object=boxplot.sas, i_desc=x variable not numeric)
133 set testdata.blood_pressure;
134 visitc = put (visit, 1.);
136 %boxplot(data=blood_pressure, x=visitc, y=sbp, group=med, report=&g_work\report12.pdf)
137 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable visitc in data set blood_pressure must be numeric)
138 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report12.pdf)), i_expected=0, i_desc=no report created)
139 %endTestcase(i_assertLog=0)
142 %initTestcase(i_object=boxplot.sas, i_desc=x variable values not equidistant)
144 set testdata.blood_pressure;
145 if visit=5 then visit=6;
147 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report13.pdf)
148 %assertLogMsg(i_logMsg=ERROR: boxplot: Values of x variable are not equidistant)
149 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report13.pdf)), i_expected=0, i_desc=no report created)
150 %endTestcase(i_assertLog=0)
153 %initTestcase(i_object=boxplot.sas, i_desc=x variable has missing values)
155 set testdata.blood_pressure;
160 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report14.pdf)
161 %assertLogMsg(i_logMsg=ERROR: boxplot: Missing values in x variable are not allowed)
162 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report14.pdf)), i_expected=0, i_desc=no report created)
163 %endTestcase(i_assertLog=0)
166 %initTestcase(i_object=boxplot.sas, i_desc=invalid y variable)
167 %boxplot(data=testdata.blood_pressure, x=visit, y=sbpXXX, group=med, report=&g_work\report15.pdf)
168 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable sbpXXX does not exist in data set testdata.blood_pressure)
169 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report15.pdf)), i_expected=0, i_desc=no report created)
170 %endTestcase(i_assertLog=0)
173 %initTestcase(i_object=boxplot.sas, i_desc=y variable not specified)
174 %boxplot(data=testdata.blood_pressure, x=visit, y=, group=med, report=&g_work\report16.pdf)
175 %assertLogMsg(i_logMsg=ERROR: boxplot: Y variable not specified)
176 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report16.pdf)), i_expected=0, i_desc=no report created)
177 %endTestcase(i_assertLog=0)
180 %initTestcase(i_object=boxplot.sas, i_desc=y variable not numeric)
182 set testdata.blood_pressure;
183 sbpc = put (sbp, best32.);
185 %boxplot(data=blood_pressure, x=visit, y=sbpc, group=med, report=&g_work\report17.pdf)
186 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable sbpc in data set blood_pressure must be numeric)
187 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report17.pdf)), i_expected=0, i_desc=no report created)
188 %endTestcase(i_assertLog=0)
191 %initTestcase(i_object=boxplot.sas, i_desc=invalid group variable)
192 %boxplot(data=testdata.blood_pressure, x=visit, y=sbp, group=medXXX, report=&g_work\report18.pdf)
193 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable medXXX does not exist in data set testdata.blood_pressure)
194 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report18.pdf)), i_expected=0, i_desc=no report created)
195 %endTestcase(i_assertLog=0)
198 %initTestcase(i_object=boxplot.sas, i_desc=group variable not specified)
199 %boxplot(data=testdata.blood_pressure, x=visit, y=sbp, group=, report=&g_work\report19.pdf)
200 %assertLogMsg(i_logMsg=ERROR: boxplot: Group variable not specified)
201 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report19.pdf)), i_expected=0, i_desc=no report created)
202 %endTestcase(i_assertLog=0)
205 %initTestcase(i_object=boxplot.sas, i_desc=group variable has only one value)
207 set testdata.blood_pressure;
210 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report20.pdf)
211 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable med must have exactly two values)
212 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report20.pdf)), i_expected=0, i_desc=no report created)
213 %endTestcase(i_assertLog=0)
216 %initTestcase(i_object=boxplot.sas, i_desc=group variable has more than two values)
217 data blood_pressure2;
218 set testdata.blood_pressure;
226 %boxplot(data=blood_pressure2, x=visit, y=sbp, group=med, report=&g_work\report21.pdf)
227 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable med must have exactly two values)
228 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report21.pdf)), i_expected=0, i_desc=no report created)
229 %endTestcase(i_assertLog=0)
232 %initTestcase(i_object=boxplot.sas, i_desc=group variable has missing values)
233 data blood_pressure3;
234 set testdata.blood_pressure;
240 %boxplot(data=blood_pressure3, x=visit, y=sbp, group=med, report=&g_work\report22.pdf)
241 %assertLogMsg(i_logMsg=ERROR: boxplot: Missing values in group variable are not allowed)
242 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report22.pdf)), i_expected=0, i_desc=no report created)
243 %endTestcase(i_assertLog=0)