aboutsummaryrefslogtreecommitdiff
path: root/tests/framework/printers/JSONPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/framework/printers/JSONPrinter.cpp')
-rw-r--r--tests/framework/printers/JSONPrinter.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/framework/printers/JSONPrinter.cpp b/tests/framework/printers/JSONPrinter.cpp
index 8d3c023a92..676ec69336 100644
--- a/tests/framework/printers/JSONPrinter.cpp
+++ b/tests/framework/printers/JSONPrinter.cpp
@@ -113,6 +113,21 @@ void JSONPrinter::print_test_footer()
*_stream << "}";
}
+void JSONPrinter::print_list_tests(const std::vector<TestInfo> &infos)
+{
+ *_stream << R"(, "list_tests" : {)";
+ bool first = true;
+ for(auto info : infos)
+ {
+ if(!first)
+ {
+ *_stream << ",";
+ }
+ *_stream << R"(")" << info.id << R"(" : { "name": ")" << info.name << R"(", "mode": ")" << info.mode << R"(", "status" : ")" << info.status << R"(" })";
+ first = false;
+ }
+ *_stream << "}";
+}
void JSONPrinter::print_errors_header()
{
_errors.clear();