Question
Please use the following insertProcedure method to answer the question. a) Define the control flow graph. You need to define the set of edges (E)
Please use the following insertProcedure method to answer the question.
a) Define the control flow graph. You need to define the set of edges (E) that defines your graph, the initial node (N0) and the final node (Nf). To simplify grading, use the line numbers for node numbers. For example, the node that represents the while statement should be node 10. (You will not need all the numbers.)
No Main(). This is for software testing
Example on how to define the following simple graph using the E, N0 and Nf:
insertProcedure (int a[], int p [], int N) { int i, j, k; for (i=0; i a[k]) { p[j] = p[j-1]; j--; } // end while p[j] = k; } // end for } // end insertProcedure
N={ 1,2,3,4 }
N0={ 1 }
Nf={ 4 }
E={ (1,2) , (1,3) , (2,4) , (3,4) }
b) Use the insertProcedure method and your control flow graph to answer the following question: Give one path that is not a test path
c) Use the insertProcedure method and your control flow graph to answer the following question: List the edge-pair coverage test requirements for the graph
3 2 4 3 2 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started