-
Junior Member
how to write test cases for a function
I met a question about how to write test cases for a function? for example, the function :
bool match (string s, string p); if s matchs p, return true , otherwise return false. string p is kind of pattern (e.g. '?'--matchc one character; '*'-- match one or more characters)
e.g S P expected result
panic pani? true
panic p* true
panic ?nic false
in my mind, I donot know how to classfy the test cases so that make the test case matrix.
Could anyone help me out?
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules