MCPcopy Create free account
hub / github.com/apple/foundationdb / printXML

Method printXML

flow/CodeProbe.cpp:149–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147 }
148
149 void printXML() const {
150 verify();
151 fmt::print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
152 fmt::print("<CoverageTool>\n");
153 if (codeProbes.empty()) {
154 fmt::print("\t<CoverageCases/>\n");
155 fmt::print("\t<Inputs/>\n");
156 } else {
157 std::vector<std::string_view> files;
158 fmt::print("\t<CoverageCases>\n");
159 for (auto probe : codeProbes) {
160 files.push_back(probe.first.file);
161 fmt::print("\t\t<Case File=\"{}\" Line=\"{}\" Comment=\"{}\" Condition=\"{}\"/>\n",
162 probe.first.file,
163 probe.first.line,
164 probe.second->comment(),
165 probe.second->condition());
166 }
167 fmt::print("\t</CoverageCases>\n");
168 fmt::print("\t<Inputs>\n");
169 for (auto const& f : files) {
170 fmt::print("\t\t<Input>{}</Input>\n", f);
171 }
172 fmt::print("\t</Inputs>\n");
173 }
174 fmt::print("</CoverageTool>\n");
175 }
176
177 void printJSON(std::vector<std::string> const& context = std::vector<std::string>()) const {
178 verify();

Callers 1

printProbesXMLMethod · 0.80

Calls 5

commentMethod · 0.80
conditionMethod · 0.80
printFunction · 0.50
emptyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected