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

Method string1

test/testpreprocessor.cpp:1259–1271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1257 }
1258
1259 void string1() {
1260 const char filedata[] = "int main()"
1261 "{"
1262 " const char *a = \"#define A\";"
1263 "}\n";
1264
1265 // Preprocess => actual result..
1266 const std::map<std::string, std::string> actual = getcode(settings0, *this, filedata);
1267
1268 // Compare results..
1269 ASSERT_EQUALS(1, actual.size());
1270 ASSERT_EQUALS("int main ( ) { const char * a = \"#define A\" ; }", actual.at(""));
1271 }
1272
1273 void string2() {
1274 const char filedata[] = "#define AAA 123\n"

Callers

nothing calls this directly

Calls 2

atMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected