Submit and vote on feature ideas.

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.

Test Case Editor

Options
SLT
SLT Posts: 9

Hi,
I have some issues to create a test case with the editor of this function (which is a 1st order filter):

_void Filter1stOrder (
T_1STORDFLT_VAL * p_ptVal, /*in out*/
const T_1STORDFLT_COEFF * p_ptCoeff, /*in*/
VCMS_real fIn, /*in*/
VCMS_real * p_fOut, /*in out*/
)
{
*p_fOut = (p_ptCoeff -> fXiCoeff) * fIn;
*p_fOut += (p_ptCoeff -> fXiminus1Coeff) * (p_ptVal -> fXiminus1);
*p_fOut += (p_ptCoeff -> fYiminus1Coeff) * (p_ptVal -> fYiminus1);

 p_ptVal -> fXiminus1= fIn;
 p_ptVal -> fYiminus1= *p_fOut;

}_

Where

void InitFilter1stOrder(
T_1STORDFLT_VAL * p_ptVal, /*in out*/
VCMS_real InitialVal /*in*/
)
{
p_ptVal -> fXiminus1=InitVal;
p_ptVal -> fYiminus1=InitVal;
}

and
_
typedef struct {
VCMS_real fXiCoeff;
VCMS_real fXiminus1Coeff;
VCMS_real fYiminus1Coeff;
} T_1STORDFLT_COEFF;

typedef struct {
VCMS_real fXiminus1;
VCMS_real fYiminus1;
} T_1STORDFLT_VAL;_

Having struct and pointers, I don't know what to put in 'Variables' field and in 'Assertions' field.
Someone could help me?

Thank you so much.

Sonia

Comments

  • Andrey Madan
    Andrey Madan Posts: 388 ✭✭✭
    Options

    Sonya,

    Have you tried new stub callback functionality in 10.4.0?