-------------------------------------------------------------------------
| 76 | |
| 77 | //------------------------------------------------------------------------- |
| 78 | TEST_F(HtmlExporterTest, Export) |
| 79 | { |
| 80 | fs::path testFolder = fs::path(PROJECT_DIR) / "Data"; |
| 81 | Plugin::CoverageData data{ L"Test", 0}; |
| 82 | std::wstring filename1{ L"TestFile1.cpp"}; |
| 83 | std::wstring filename2{ L"TestFile2.cpp"}; |
| 84 | |
| 85 | auto& module1 = data.AddModule(L"Module1.exe"); |
| 86 | auto& file1 = module1.AddFile(testFolder / filename1); |
| 87 | auto& file2 = module1.AddFile(testFolder / filename2); |
| 88 | |
| 89 | file1.AddLine(0, true); |
| 90 | file2.AddLine(0, true); |
| 91 | |
| 92 | data.AddModule(L"Module2.exe"); |
| 93 | |
| 94 | htmlExporter_.Export(data, output_); |
| 95 | |
| 96 | auto modulesPath = output_.GetPath() / Exporter::HtmlFolderStructure::FolderModules; |
| 97 | ASSERT_TRUE(Tools::FileExists(output_.GetPath() / "index.html")); |
| 98 | ASSERT_TRUE(Tools::FileExists(modulesPath / "module1.html")); |
| 99 | ASSERT_FALSE(Tools::FileExists(modulesPath / "module2.html")); |
| 100 | ASSERT_TRUE(Tools::FileExists(modulesPath / "module1" / (filename1 + L".html"))); |
| 101 | ASSERT_TRUE(Tools::FileExists(modulesPath / "module1" / (filename2 + L".html"))); |
| 102 | } |
| 103 | |
| 104 | //------------------------------------------------------------------------- |
| 105 | TEST_F(HtmlExporterTest, NoWarning) |
nothing calls this directly
no test coverage detected