99#include " visitors/VerboseAssertsReturnValueVisitor.h"
1010#include " visitors/VerboseParameterVisitor.h"
1111#include " utils/KleeUtils.h"
12+ #include " utils/StubsUtils.h"
1213
1314#include " loguru.h"
1415
@@ -452,20 +453,27 @@ void TestsPrinter::verboseParameters(const Tests::MethodDescription &methodDescr
452453 ss << NL;
453454 }
454455
455- if (!testCase.stubValuesTypes .empty ()) {
456- strComment (" Initialize symbolic stubs" );
457- for (auto i = 0 ; i < testCase.stubValuesTypes .size (); i++) {
458- const auto ¶m = testCase.stubValuesTypes [i];
459- const auto &value = testCase.stubValues [i];
460- if (param.type .isTwoDimensionalPointer ()) {
461- Tests::MethodParam valueParam{ param.type , param.underscoredName (), param.alignment };
462- verboseParameter (methodDescription, valueParam, value, true );
463- gen2DPointer (param, false );
464- } else {
465- verboseParameter (methodDescription, param, value, false );
456+ std::vector<std::vector<tests::Tests::MethodParam>> types = { testCase.stubValuesTypes , testCase.stubParamTypes };
457+ std::vector<std::vector<tests::Tests::TestCaseParamValue>> values = { testCase.stubParamValues , testCase.stubParamValues };
458+
459+ for (int j = 0 ; j < types.size (); j++) {
460+ if (!types[j].empty ()) {
461+ if (j == 0 ) {
462+ strComment (" Initialize symbolic stubs" );
463+ }
464+ for (auto i = 0 ; i < types[j].size (); i++) {
465+ const auto ¶m = types[j][i];
466+ const auto &value = values[j][i];
467+ if (param.type .isTwoDimensionalPointer ()) {
468+ Tests::MethodParam valueParam{ param.type , param.underscoredName (), param.alignment };
469+ verboseParameter (methodDescription, valueParam, value, true );
470+ gen2DPointer (param, false );
471+ } else {
472+ verboseParameter (methodDescription, param, value, false );
473+ }
466474 }
475+ ss << NL;
467476 }
468- ss << NL;
469477 }
470478
471479 if (!testCase.paramValues .empty ()) {
@@ -488,7 +496,7 @@ void TestsPrinter::printFunctionParameters(const Tests::MethodDescription &metho
488496 Tests::TestCaseParamValue value = testCase.paramValues [i];
489497 Tests::MethodParam valueParam = getValueParam (param);
490498 value.name = valueParam.name ;
491- if (param.type .isLValueReference () || param.type .isSimple ()) {
499+ if (param.type .isLValueReference () || param.type .isSimple () || param. type . isPointerToFunction () ) {
492500 verboseParameter (methodDescription, valueParam, value, true );
493501 }
494502 }
@@ -499,9 +507,8 @@ void TestsPrinter::verboseParameter(const Tests::MethodDescription &method,
499507 const Tests::MethodParam ¶m,
500508 const Tests::TestCaseParamValue &value,
501509 bool needDeclaration) {
502- std::string stubFunctionName =
503- PrinterUtils::getFunctionPointerStubName (method.getClassTypeName (),
504- method.name , param.name );
510+ std::string stubFunctionName = StubsUtils::getFunctionPointerStubName (method.getClassTypeName (),
511+ method.name , param.name );
505512 if (types::TypesHandler::isPointerToFunction (param.type )) {
506513 strDeclareVar (getTypedefFunctionPointer (method.name , param.name , false ), param.name ,
507514 stubFunctionName);
@@ -659,7 +666,7 @@ void TestsPrinter::printPointerParameter(const Tests::MethodDescription &methodD
659666 const auto &value = testCase.paramValues [param_num];
660667 if (types::TypesHandler::isArrayOfPointersToFunction (param.type )) {
661668 auto type = getTypedefFunctionPointer (methodDescription.name , param.name , false );
662- std::string stubName = PrinterUtils ::getFunctionPointerStubName (
669+ std::string stubName = StubsUtils ::getFunctionPointerStubName (
663670 methodDescription.getClassTypeName (), methodDescription.name , param.name );
664671 strDeclareArrayOfFunctionPointerVar (type, param.name , stubName);
665672 } else if (types::TypesHandler::isCStringType (param.type )) {
0 commit comments