Files
Library/include/Void/Testing/JUnitReporter.hpp
T
faumaray e7186f17f0 Testing module
Signed-off-by: faumaray <faumaray@gmail.com>
2026-04-29 22:49:33 +03:00

21 lines
753 B
C++

#pragma once
#include <Void/Testing/Reporter.hpp>
#include <ostream>
namespace Void::Testing {
class JUnitReporter final : public Reporter {
public:
explicit JUnitReporter(std::ostream& os) : os_(os) {}
void on_run_start(const RunConfig& config, int total_tests) override;
void on_suite_start(const std::string& suite_name, int test_count) override;
void on_test_start(const TestCase& test) override;
void on_test_end(const TestResult& result) override;
void on_suite_end(const SuiteResult& result) override;
void on_run_end(const RunResult& result) override;
private:
std::ostream& os_;
std::vector<SuiteResult> suite_results_;
static std::string xml_escape(std::string_view s);
};
} // namespace Void::Testing