---------------------------------------------------------------------
| 29 | { |
| 30 | //--------------------------------------------------------------------- |
| 31 | TEST(CppCliTest, ManagedUnManagedModule) |
| 32 | { |
| 33 | auto vsPath = TestHelper::GetVisualStudioPath(); |
| 34 | fs::path vsConsoleTestPath = vsPath / "Common7" / "IDE" / |
| 35 | "CommonExtensions" / "Microsoft" / |
| 36 | "TestWindow" / "vstest.console.exe"; |
| 37 | auto testCppCliPath = (fs::path{OUT_DIR} / "DefaultTest.dll").wstring(); |
| 38 | auto sharedLibModulePath = TestCoverageSharedLib::GetOutputBinaryPath(); |
| 39 | |
| 40 | TestTools::CoverageArgs coverageArgs( |
| 41 | {testCppCliPath}, testCppCliPath, L"None"); |
| 42 | coverageArgs.modulePatternCollection_.push_back( |
| 43 | sharedLibModulePath.wstring()); |
| 44 | coverageArgs.programToRun_ = vsConsoleTestPath; |
| 45 | |
| 46 | auto coverage = TestTools::ComputeCoverageDataPatterns(coverageArgs); |
| 47 | ASSERT_EQ(0, coverage.GetExitCode()); |
| 48 | const auto& modules = coverage.GetModules(); |
| 49 | ASSERT_EQ(1, modules.size()); |
| 50 | ASSERT_EQ(sharedLibModulePath, modules.at(0)->GetPath()); |
| 51 | } |
| 52 | } |
nothing calls this directly
no test coverage detected