Question: 7 . Add Tests for matching _ parens The function matching _ parens is new, though it is similar to first _ in _ parens
Add Tests for matchingparens
The function matchingparens is new, though it is similar to firstinparens in several ways. First of all, you should include all combinations of parentheses that you did in your tests for firstinparens. However, matchingparens does not care about what is inside a pair of parentheses, so a test A C with nothing inside parentheses is the same as a test A B C In addition, matchingparens has a less restrictive precondition, and so it allows possibilities that firstinparens does not, such as no parentheses or just one half of a pair of parentheses.
Design several test cases for matchingparens and add them to the test procedure testsmatchingparens. You should have at least significantly different tests.
NOTE: You are expected to use the assertequals, asserttrue, assertfalse functions from the introcs module to write testsmatchingparens. Do not use any other assert function in the Asserting Tests section of the IntroCS documentation. If you use one of the asserttrue or assertfalse functions, do not include not as part of the argument. For example, you would use asserttrueresult instead of assertfalsenot result or assertfalseresult instead of asserttruenot result
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
