From 993852fb0d0ef7a77a73a32c7dbc3e2a73a451a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Antoniak?= Date: Tue, 14 Oct 2025 10:53:52 +0200 Subject: [PATCH] Creating unit tests for the WriteReport method (NativeV2) --- Coverage/Test/writeReportTest.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Coverage/Test/writeReportTest.cpp b/Coverage/Test/writeReportTest.cpp index 581f42a..c7bbf54 100644 --- a/Coverage/Test/writeReportTest.cpp +++ b/Coverage/Test/writeReportTest.cpp @@ -96,6 +96,37 @@ namespace TestFormat WriteReport(expectReport, RuntimeOptions::ExportFormatType::Native, mergedProfileData); } + TEST_METHOD(WriteReportNativeV2) + { + const std::string expectReport = + R"()""\n" \ + R"()""\n" \ + R"( )""\n" \ + R"( )""\n" \ + R"( )""\n" \ + R"( BIACwAAAAIACwA==)""\n" \ + R"( )""\n" \ + R"( )""\n" \ + R"( )""\n" \ + R"( BoADgA==)""\n" \ + R"( )""\n" \ + R"( )""\n" \ + R"( )""\n" \ + R"( )""\n" \ + R"( )""\n" \ + R"( AIAAgACA)""\n" \ + R"( )""\n" \ + R"( )""\n" \ + R"( )""\n" \ + R"( DMAHwACA)""\n" \ + R"( )""\n" \ + R"( )""\n" \ + R"()""\n"; + + FileCallbackInfo::MergedProfileInfoMap mergedProfileData; // it doesn't matter, can be empty + WriteReport(expectReport, RuntimeOptions::ExportFormatType::NativeV2, mergedProfileData); + } + TEST_METHOD(WriteReportCobertura) { const std::string expectReport =