Given the following function for trimming a string: function trim(instring: string) : string; const blank  ‘ ‘; var i,j : integer, found : boolean, result : string; begin i : length (instring); found...

Given the following function for trimming a string: function trim(instring: string) : string; const blank  ‘ ‘; var i,j : integer, found : boolean, result : string; begin i : length (instring); found : false; while (not found) and (i  1) do begin if instring[i] blank then found : true else i : i - 1 end; for j : 1 to i do result[j] : instring[j]; return result; end; Briefly describe the main purpose of this function. Produce a black box-based test plan using both boundary value analysis and equivalence class testing given the function interface and its functional description. Produce a control flow graph. Produce a white boxbased test plan to catch the maximum number of errors. Produce a path expression from the obtained flow graph. Produce 2 path expressions describing the data flow for variables i and found. Is there any data flow anomaly? show it? Suppose instead of i : i - 1 we have written i : i  1, which test cases developed earlier would detect the error and how? Suppose instead of i  1 we have written i  1, which test cases developed earlier would detect the error and how? Suppose instead of instring[i]  blank, we have written instring[i]  blank, which test case would detect the error and how? Suppose instead of and in (not found) and (i  1), we have written or, which test case would detect the error and how?



May 26, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here