25 %initTestcase(i_object=boxplot.sas, i_desc=standard
case without reference)
26 %boxplot(data=testdata.blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report1.pdf)
27 %assertReport(i_actual=&g_work\report1.pdf, i_expected=,
28 i_desc=please compare chart with specification in source code)
31 %initTestcase(i_object=boxplot.sas, i_desc=standard
case with reference)
32 %boxplot(data=testdata.blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report2.pdf)
33 %assertReport(i_actual=&g_work\report2.pdf, i_expected=&g_refdata\boxplot1.pdf,
34 i_desc=please compare the two charts)
37 %initTestcase(i_object=boxplot.sas, i_desc=%str(standard
case with reference, missing values
for Y ))
39 set testdata.blood_pressure;
44 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report3.pdf)
45 %assertReport(i_actual=&g_work\report3.pdf, i_expected=&g_refdata\boxplot1.pdf,
46 i_desc=%str(please compare the two charts, no changes produced by missing values in the y variable))
47 %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)
48 ,i_desc=regular expression used to support different languages
52 %initTestcase(i_object=boxplot.sas, i_desc=different scaling
for x and y axis)
54 set testdata.blood_pressure;
58 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report4.pdf)
59 %assertReport(i_actual=&g_work\report4.pdf, i_expected=,
60 i_desc=please compare chart with specification in source code)
63 %initTestcase(i_object=boxplot.sas, i_desc=only two visits)
65 set testdata.blood_pressure;
66 where visit in (1, 5);
68 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report5.pdf)
69 %assertReport(i_actual=&g_work\report5.pdf, i_expected=,
70 i_desc=please compare chart with specification in source code)
73 %initTestcase(i_object=boxplot.sas, i_desc=only one visit)
75 set testdata.blood_pressure;
78 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report6.pdf)
79 %assertLogMsg(i_logMsg=ERROR: boxplot: x variable must have at least two values)
80 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report6.pdf)), i_expected=0, i_desc=no report created)
81 %endTestcase(i_assertLog=0)
84 %initTestcase(i_object=boxplot.sas, i_desc=18 visits)
87 testdata.blood_pressure (in=in1)
88 testdata.blood_pressure (in=in2)
89 testdata.blood_pressure (in=in3)
91 if in2 then visit=visit+6;
92 if in3 then visit=visit+12;
94 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report7.pdf)
95 %assertReport(i_actual=&g_work\report7.pdf, i_expected=,
96 i_desc=please compare chart with specification in source code)
99 %initTestcase(i_object=boxplot.sas, i_desc=invalid input data set)
100 %boxplot(data=XXXXX, x=visit, y=sbp, group=med, report=&g_work\report8.pdf)
101 %assertLogMsg(i_logMsg=ERROR: boxplot: Data set XXXXX does not exist)
102 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report8.pdf)), i_expected=0, i_desc=no report created)
103 %endTestcase(i_assertLog=0)
106 %initTestcase(i_object=boxplot.sas, i_desc=input data set missing)
107 %boxplot(data=, x=visit, y=sbp, group=med, report=&g_work\report9.pdf)
108 %assertLogMsg(i_logMsg=ERROR: boxplot: Data set does not exist)
109 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report9.pdf)), i_expected=0, i_desc=no report created)
110 %endTestcase(i_assertLog=0)
113 %initTestcase(i_object=boxplot.sas, i_desc=invalid x variable)
114 %boxplot(data=testdata.blood_pressure, x=visitXXX, y=sbp, group=med, report=&g_work\report10.pdf)
115 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable visitXXX does not exist in data set testdata.blood_pressure)
116 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report10.pdf)), i_expected=0, i_desc=no report created)
117 %endTestcase(i_assertLog=0)
120 %initTestcase(i_object=boxplot.sas, i_desc=x variable missing)
121 %boxplot(data=testdata.blood_pressure, x=, y=sbp, group=med, report=&g_work\report11.pdf)
122 %assertLogMsg(i_logMsg=ERROR: boxplot: X variable not specified)
123 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report11.pdf)), i_expected=0, i_desc=no report created)
124 %endTestcase(i_assertLog=0)
127 %initTestcase(i_object=boxplot.sas, i_desc=x variable not numeric)
129 set testdata.blood_pressure;
130 visitc = put (visit, 1.);
132 %boxplot(data=blood_pressure, x=visitc, y=sbp, group=med, report=&g_work\report12.pdf)
133 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable visitc in data set blood_pressure must be numeric)
134 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report12.pdf)), i_expected=0, i_desc=no report created)
135 %endTestcase(i_assertLog=0)
138 %initTestcase(i_object=boxplot.sas, i_desc=x variable values not equidistant)
140 set testdata.blood_pressure;
141 if visit=5 then visit=6;
143 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report13.pdf)
144 %assertLogMsg(i_logMsg=ERROR: boxplot: Values of x variable are not equidistant)
145 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report13.pdf)), i_expected=0, i_desc=no report created)
146 %endTestcase(i_assertLog=0)
149 %initTestcase(i_object=boxplot.sas, i_desc=x variable has missing values)
151 set testdata.blood_pressure;
156 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report14.pdf)
157 %assertLogMsg(i_logMsg=ERROR: boxplot: Missing values in x variable are not allowed)
158 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report14.pdf)), i_expected=0, i_desc=no report created)
159 %endTestcase(i_assertLog=0)
162 %initTestcase(i_object=boxplot.sas, i_desc=invalid y variable)
163 %boxplot(data=testdata.blood_pressure, x=visit, y=sbpXXX, group=med, report=&g_work\report15.pdf)
164 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable sbpXXX does not exist in data set testdata.blood_pressure)
165 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report15.pdf)), i_expected=0, i_desc=no report created)
166 %endTestcase(i_assertLog=0)
169 %initTestcase(i_object=boxplot.sas, i_desc=y variable not specified)
170 %boxplot(data=testdata.blood_pressure, x=visit, y=, group=med, report=&g_work\report16.pdf)
171 %assertLogMsg(i_logMsg=ERROR: boxplot: Y variable not specified)
172 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report16.pdf)), i_expected=0, i_desc=no report created)
173 %endTestcase(i_assertLog=0)
176 %initTestcase(i_object=boxplot.sas, i_desc=y variable not numeric)
178 set testdata.blood_pressure;
179 sbpc = put (sbp, best32.);
181 %boxplot(data=blood_pressure, x=visit, y=sbpc, group=med, report=&g_work\report17.pdf)
182 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable sbpc in data set blood_pressure must be numeric)
183 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report17.pdf)), i_expected=0, i_desc=no report created)
184 %endTestcase(i_assertLog=0)
187 %initTestcase(i_object=boxplot.sas, i_desc=invalid group variable)
188 %boxplot(data=testdata.blood_pressure, x=visit, y=sbp, group=medXXX, report=&g_work\report18.pdf)
189 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable medXXX does not exist in data set testdata.blood_pressure)
190 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report18.pdf)), i_expected=0, i_desc=no report created)
191 %endTestcase(i_assertLog=0)
194 %initTestcase(i_object=boxplot.sas, i_desc=group variable not specified)
195 %boxplot(data=testdata.blood_pressure, x=visit, y=sbp, group=, report=&g_work\report19.pdf)
196 %assertLogMsg(i_logMsg=ERROR: boxplot: Group variable not specified)
197 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report19.pdf)), i_expected=0, i_desc=no report created)
198 %endTestcase(i_assertLog=0)
201 %initTestcase(i_object=boxplot.sas, i_desc=group variable has only one value)
203 set testdata.blood_pressure;
206 %boxplot(data=blood_pressure, x=visit, y=sbp, group=med, report=&g_work\report20.pdf)
207 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable med must have exactly two values)
208 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report20.pdf)), i_expected=0, i_desc=no report created)
209 %endTestcase(i_assertLog=0)
212 %initTestcase(i_object=boxplot.sas, i_desc=group variable has more than two values)
213 data blood_pressure2;
214 set testdata.blood_pressure;
222 %boxplot(data=blood_pressure2, x=visit, y=sbp, group=med, report=&g_work\report21.pdf)
223 %assertLogMsg(i_logMsg=ERROR: boxplot: Variable med must have exactly two values)
224 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report21.pdf)), i_expected=0, i_desc=no report created)
225 %endTestcase(i_assertLog=0)
228 %initTestcase(i_object=boxplot.sas, i_desc=group variable has missing values)
229 data blood_pressure3;
230 set testdata.blood_pressure;
236 %boxplot(data=blood_pressure3, x=visit, y=sbp, group=med, report=&g_work\report22.pdf)
237 %assertLogMsg(i_logMsg=ERROR: boxplot: Missing values in group variable are not allowed)
238 %assertEquals(i_actual=%sysfunc(fileexist(&g_work\report22.pdf)), i_expected=0, i_desc=no report created)
239 %endTestcase(i_assertLog=0)