Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How set parameter vaules of a stub depend on test case

AlexWeidm
AlexWeidm Posts: 1

In my project I've a stub of a fread -function (ANSI C file raed).

CppTest_Stub_fread (void * _MT_var52, size_t _MT_var53, size_t _MT_var54, FILE * _MT_var55); //stub declaration

How to set the out put paramer _MT_var52 from the testcase body?

CPPTEST_ON_CALL("foo")->Arg("__return").Assign()->Int(5);
CPPTEST_ON_CALL("fread")->Arg("_MT_var52").Assign()->Int(1024);

Tagged: