@@ -40,6 +40,8 @@ namespace {
40
40
buildDirRelativePath, clientProjectPath };
41
41
fs::path sum_test_cpp =
42
42
Paths::sourcePathToTestPath (projectContext, calc_sum_c);
43
+ fs::path foreign_bar_test_cpp =
44
+ Paths::sourcePathToTestPath (projectContext, foreign_bar_c);
43
45
44
46
std::vector<fs::path> modifiedSourceFiles = { literals_foo_c, calc_sum_h, calc_sum_c };
45
47
@@ -179,6 +181,27 @@ namespace {
179
181
EXPECT_EQ (expectedStubFiles, result.getOpt ().value ());
180
182
}
181
183
184
+ TEST_F (Stub_Test, Run_Tests_mltimodule_Lib) {
185
+ auto request = testUtils::createFileRequest (projectName, suitePath, buildDirRelativePath,
186
+ srcPaths, foreign_bar_c, foreign_bar_c, true );
187
+
188
+ auto testGen = FileTestGen (*request, writer.get (), TESTMODE);
189
+ Status status = Server::TestsGenServiceImpl::ProcessBaseTestRequest (testGen, writer.get ());
190
+ ASSERT_TRUE (status.ok ()) << status.error_message ();
191
+ EXPECT_EQ (testUtils::getNumberOfTests (testGen.tests ), 2 );
192
+
193
+ auto testFilter = GrpcUtils::createTestFilterForFile (foreign_bar_test_cpp);
194
+ auto runRequest = testUtils::createCoverageAndResultsRequest (
195
+ projectName, suitePath, testsDirPath, buildDirRelativePath, std::move (testFilter));
196
+
197
+ static auto coverageAndResultsWriter =
198
+ std::make_unique<ServerCoverageAndResultsWriter>(nullptr );
199
+ CoverageAndResultsGenerator coverageGenerator{ runRequest.get (), coverageAndResultsWriter.get () };
200
+ utbot::SettingsContext settingsContext{ true , true , 15 , 0 , true , true , ErrorMode::FAILING, false };
201
+ coverageGenerator.generate (true , settingsContext);
202
+ EXPECT_FALSE (coverageGenerator.hasExceptions ());
203
+ }
204
+
182
205
TEST_F (Stub_Test, File_Tests_With_Stubs) {
183
206
auto request = testUtils::createFileRequest (projectName, suitePath, buildDirRelativePath,
184
207
srcPaths, literals_foo_c, literals_foo_c, true );
0 commit comments