ORCA-C/Tests/Conformance/C8.7.0.5.CC
2017-10-21 18:40:19 -05:00

29 lines
482 B
C++

/* Conformance Test 8.7.0.5: Test sparse switch statements */
#include <stdio.h>
void main(void)
{
int i, hundreds = 0;
for (i = 0; i < 1000; i += 10)
switch (i) {
case 100:
case 200:
case 300:
case 400:
case 500:
case 600:
case 700:
case 800:
case 900:
hundreds++;
}
if (hundreds == 9)
printf ("Passed Conformance Test 8.7.0.5\n");
else
printf ("Failed Conformance Test 8.7.0.5\n");
}