MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / canFindMatchingBracketsOuterPair

Method canFindMatchingBracketsOuterPair

test/testtoken.cpp:1163–1170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1161 }
1162
1163 void canFindMatchingBracketsOuterPair() {
1164 SimpleTokenizer var(*this);
1165 ASSERT(var.tokenize("std::deque<std::set<int> > intsets;"));
1166
1167 const Token* const t = var.tokens()->tokAt(3)->findClosingBracket();
1168 ASSERT_EQUALS(">", t->str());
1169 ASSERT(var.tokens()->tokAt(10) == t);
1170 }
1171
1172 void canFindMatchingBracketsWithTooManyClosing() {
1173 SimpleTokenizer var(*this);

Callers

nothing calls this directly

Calls 4

tokenizeMethod · 0.80
findClosingBracketMethod · 0.45
tokAtMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected