/* CS 4320 SOFTWARE TESTING AND QUALITY ASSURANCE Perform white box testing on the following code. 1. FLOWGRAPH 2. CYCLOMETRIC COMPLEXITY 3. BASIS SET OF CYCLES 4. LINEARLY INDEPENDENT PATHS 5. FEASABLE (YES/NO) 6. TEST CASES 7. RESULT (i,j) (i) TRY TO GET AS MANY FEASABLE INDEPENDENT PATHS AS POSSIBLE. */ #include int debug = 0; int L(int i) { if (debug) printf("%d-",i); return 1; } int compute() { int i,j; L(1); scanf("%d %d",&i,&j); if (L(2) && (i == 1)) if (L(3) && (j == 1)) while (L(4) && (i == j)) { L(5); i = i - 1; } else { L(6); i = i + 1; } else { L(7); i = i - 2; } L(8); return (i); } int main(int argc, char *argv[]) { if (argc > 1) { debug = 1; printf("Path : "); } printf("\nActual : Result=%d\n",compute()); }