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

Method match

test/testregex.cpp:60–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 }
59
60 void match() const {
61 const auto r = assertRegex("begin.*end");
62 int called = 0;
63 int s = -1;
64 int e = -1;
65 auto f = [&](int start, int end) {
66 ++called;
67 s = start;
68 e = end;
69 };
70 ASSERT_EQUALS("", r->match("begin-123-end", std::move(f)));
71 ASSERT_EQUALS(1, called);
72 ASSERT_EQUALS(0, s);
73 ASSERT_EQUALS(13, e);
74 }
75
76 void nomatch() const {
77 const auto r = assertRegex("begin.*end");

Callers 15

scan_packageFunction · 0.45
print_checkersFunction · 0.45
get_checkers.pyFile · 0.45
getpackagesFunction · 0.45
count_errorsFunction · 0.45
MT-Unsafe.pyFile · 0.45
set_versionFunction · 0.45
check_sedFunction · 0.45
serverFunction · 0.45
_replaceTokenMatchMethod · 0.45
getpackagesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected