How to write test cases for this function
Hi, Guys,
I met a interview questions today, the question is to test this bool function
bool match (string s, string p);
string p is a pattern string, that means include character such as '?' or '*'
e.g. if s = 'panic' and p='pani?', it will return true,
if s ='panic' and p ='p*', it will return true,
if s = 'panic' and p= '??' it will return false.
I don't know how to write down test cases and how to classify the test cases such as valid or invalid, boundary test , could anyone help me out?
Thanks in advance.
Questions by irisli
Showing Answers 1 - 3 of 3 Answers
Related Answered Questions
Related Open Questions
How to write test cases for this function
I met a interview questions today, the question is to test this bool function
bool match (string s, string p);
string p is a pattern string, that means include character such as '?' or '*'
e.g. if s = 'panic' and p='pani?', it will return true,
if s ='panic' and p ='p*', it will return true,
if s = 'panic' and p= '??' it will return false.
I don't know how to write down test cases and how to classify the test cases such as valid or invalid, boundary test , could anyone help me out?
Thanks in advance.
Profile Answers by irisli Questions by irisli
Questions by irisli
Related Answered Questions
Related Open Questions