@@ -153,8 +153,10 @@ KleeGenerator::getCompileCommandForKlee(const fs::path &hintPath,
153153 }
154154 command.setSourcePath (srcFilePath);
155155
156- auto outFilePath = (forStub ? testGen->getProjectBuildDatabase ()->getBitcodeFile (compilationUnitInfo->getOutputFile ())
157- : testGen->getTargetBuildDatabase ()->getBitcodeFile (compilationUnitInfo->getOutputFile ()));
156+ auto outFilePath = (forStub ? testGen->getProjectBuildDatabase ()->getBitcodeFile (
157+ compilationUnitInfo->getOutputFile ())
158+ : testGen->getTargetBuildDatabase ()->getBitcodeFile (
159+ compilationUnitInfo->getOutputFile ()));
158160 fs::create_directories (outFilePath.parent_path ());
159161 command.setOutput (outFilePath);
160162 command.setOptimizationLevel (" -O0" );
@@ -227,7 +229,7 @@ Result<fs::path> KleeGenerator::defaultBuild(const fs::path &hintPath,
227229
228230 auto makefileCommand = MakefileUtils::MakefileCommand (testGen->projectContext , makefile,
229231 printer::DefaultMakefilePrinter::TARGET_BUILD);
230- auto [out, status, _] = makefileCommand.run ();
232+ auto [out, status, _] = makefileCommand.run ();
231233 if (status != 0 ) {
232234 LOG_S (ERROR) << " Compilation for " << sourceFilePath << " failed.\n "
233235 << " Command: \" " << commandWithChangingDirectory.toString () << " \"\n "
@@ -264,7 +266,8 @@ std::vector<fs::path> KleeGenerator::buildKleeFiles(const tests::TestsMap &tests
264266 const std::shared_ptr<LineInfo> &lineInfo) {
265267 std::vector<fs::path> outFiles;
266268 LOG_S (DEBUG) << " Building generated klee files..." ;
267- printer::KleePrinter kleePrinter (&typesHandler, testGen->getTargetBuildDatabase (), utbot::Language::UNKNOWN, testGen);
269+ printer::KleePrinter kleePrinter (&typesHandler, testGen->getTargetBuildDatabase (), utbot::Language::UNKNOWN,
270+ testGen);
268271 ExecUtils::doWorkWithProgress (
269272 testsMap, testGen->progressWriter , " Building generated klee files" ,
270273 [&](auto const &it) {
@@ -344,14 +347,14 @@ std::vector<fs::path> KleeGenerator::buildKleeFiles(const tests::TestsMap &tests
344347}
345348
346349void KleeGenerator::parseKTestsToFinalCode (
347- const utbot::ProjectContext &projectContext,
348- tests::Tests &tests,
349- const std::unordered_map<std::string, types::Type> &methodNameToReturnTypeMap,
350- const std::vector<MethodKtests> &kleeOutput,
351- const std::shared_ptr<LineInfo> &lineInfo,
352- bool verbose,
353- ErrorMode errorMode) {
354- for (const auto &batch : kleeOutput) {
350+ const utbot::ProjectContext &projectContext,
351+ tests::Tests &tests,
352+ const std::unordered_map<std::string, types::Type> &methodNameToReturnTypeMap,
353+ const std::vector<MethodKtests> &kleeOutput,
354+ const std::shared_ptr<LineInfo> &lineInfo,
355+ bool verbose,
356+ ErrorMode errorMode) {
357+ for (const auto &batch: kleeOutput) {
355358 bool filterByFlag = (lineInfo != nullptr && !lineInfo->forMethod && !lineInfo->forClass &&
356359 !lineInfo->predicateInfo .has_value ());
357360 tests::KTestObjectParser KTestObjectParser (typesHandler);
@@ -375,12 +378,12 @@ void KleeGenerator::parseKTestsToFinalCode(
375378 continue ;
376379 }
377380 auto predicate =
378- lineInfo ? lineInfo->predicateInfo : std::optional<LineInfo::PredicateInfo>{};
381+ lineInfo ? lineInfo->predicateInfo : std::optional<LineInfo::PredicateInfo>{};
379382 testsPrinter.genCode (methodDescription, predicate, verbose, errorMode);
380383 }
381384
382385 printer::HeaderPrinter (Paths::getSourceLanguage (tests.sourceFilePath ))
383- .print (tests.testHeaderFilePath , tests.sourceFilePath , tests.headerCode );
386+ .print (tests.testHeaderFilePath , tests.sourceFilePath , tests.headerCode );
384387 testsPrinter.joinToFinalCode (tests, tests.testHeaderFilePath );
385388 LOG_S (DEBUG) << " Generated code for " << tests.methods .size () << " tests" ;
386389}
0 commit comments