Question: 2. The Following is the source code that will need to do the mutation testing, how many mutants can be given to this source code,
2. The Following is the source code that will need to do the mutation testing, how many mutants can be given to this source code, and list each mutants and explain why you did this kinds of mutants? (10 points)
Public Function isLeap(year) As Boolean Dim year As Integer Dim c1, c2, c3 As Boolean 1. c1 = (year % 4 == 0) 2. c2 = (year % 100 == 0) 3. c3 = (year % 400= = 0) 4. isLeap = False 5. If ( (c1 AND NOT(c2)) OR (c3)) Then 6. IsLeap = True 7. EndIf 8. End Function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
