Consider the following class definition:
class StrToTokens {
StrToTokens(const char* str, const char* delimiters = "\t\r\n"); //constructor
string getNextToken();
void reset();
bool empty();
}
Can someone list some good testcases to test the above class.
A few I could think of are:
empty string, empty delimiters, repeated delimiters, consecutive delimiters, string with only delimiters.
However, the interviewer expected some more(better ones). Can you help out.
Thanks.