%description: Negative test cases for StringTokenizer2. %includes: #include %global: using namespace omnetpp::common; static void tokenize(const char *text) { try { StringTokenizer2 tokenizer(text, " ", "(){}", "'"); while (tokenizer.hasMoreTokens()) { tokenizer.nextToken(); } EV << "FAILED\n"; } catch (StringTokenizerException& e) { EV << e.what() << "\n"; } catch (std::exception& e) { EV << "ERROR: " << e.what() << "\n"; } } %activity: #define T(x) tokenize(x); T("{"); T("}"); T("("); T(")"); T("{(})") T("'bubu"); EV << ".\n"; %contains: stdout Unclosed parenthesis '{' Unmatched closing parenthesis '}' Unclosed parenthesis '(' Unmatched closing parenthesis ')' Unmatched closing parenthesis '}' Unclosed string constant .