| 4 | using namespace ftg; |
| 5 | |
| 6 | std::string BoostCallWriter::getTCCall(const Unittest &TC, |
| 7 | std::string Indent) const { |
| 8 | const std::string InstanceName = "Fuzzer"; |
| 9 | |
| 10 | const auto *TCTestBody = TC.getTestBody(); |
| 11 | if (!TCTestBody) |
| 12 | return ""; |
| 13 | |
| 14 | auto StructName = TCTestBody->getClassName(); |
| 15 | if (StructName.empty()) |
| 16 | return ""; |
| 17 | |
| 18 | return Indent + "try {\n" + Indent + util::getIndent(1) + "struct " + |
| 19 | StructName + " " + InstanceName + ";\n" + Indent + util::getIndent(1) + |
| 20 | InstanceName + ".test_method();\n" + Indent + |
| 21 | "} catch (std::exception &E) {}\n"; |
| 22 | } |
nothing calls this directly
no test coverage detected