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

Method endifsemicolon

test/testpreprocessor.cpp:1530–1544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1528 }
1529
1530 void endifsemicolon() {
1531 const char filedata[] = "void f() {\n"
1532 "#ifdef A\n"
1533 "#endif;\n"
1534 "}\n";
1535
1536 // Preprocess => actual result..
1537 const std::map<std::string, std::string> actual = getcode(settings0, *this, filedata);
1538
1539 // Compare results..
1540 ASSERT_EQUALS(2, actual.size());
1541 const std::string expected("void f ( ) {\n\n\n}");
1542 ASSERT_EQUALS(expected, actual.at(""));
1543 ASSERT_EQUALS(expected, actual.at("A=A"));
1544 }
1545
1546 void handle_error() {
1547 {

Callers

nothing calls this directly

Calls 2

atMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected