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

Method testaddtoken1

test/testtokenlist.cpp:52–57  ·  view source on GitHub ↗

inspired by #5895

Source from the content-addressed store, hash-verified

50
51 // inspired by #5895
52 void testaddtoken1() const {
53 const std::string code = "0x89504e470d0a1a0a";
54 TokenList tokenlist(settingsDefault, Standards::Language::CPP);
55 tokenlist.addtoken(code, 1, 1, false);
56 ASSERT_EQUALS("0x89504e470d0a1a0a", tokenlist.front()->str());
57 }
58
59 void testaddtoken2() const {
60 const std::string code = "0xF0000000";

Callers

nothing calls this directly

Calls 3

frontMethod · 0.80
addtokenMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected