vector.com|Contact
Search tips

apple banana
Find rows that contain at least one of the two words.

+apple +juice
Find rows that contain both words.

+apple macintosh
Find rows that contain the word 'apple', but rank rows higher if they also contain 'macintosh'.

+apple -macintosh
Find rows that contain the word 'apple' but not 'macintosh'.

+apple ~macintosh
Find rows that contain the word 'apple', but if the row also contains the word 'macintosh', rate it lower than if row does not. This is "softer" than a search for '+apple -macintosh', for which the presence of 'macintosh' causes the row not to be returned at all.

+apple +(>turnover >strudel)
Find rows that contain the words 'apple' and 'turnover', or 'apple' and 'strudel' (in any order), but rank 'apple turnover' higher than 'apple strudel'.

apple*
Find rows that contain words such as 'apple', 'apples', 'applesauce', or 'applet'.

"some words"
Find rows that contain the exact phrase 'some words' (for example, rows that contain 'some words of wisdom' but not "some noise words").

By continuing to use this site you agree to the use of cookies. For more information and to find out how to change this click here. Accept Cookies
Please enable cookies in your browser for this website.
Search:
Advanced search

Return Different Values From a Stub Function when Called Multiple Times in a UUT Function

Last updated: 2020-05-13
Question:

How to return different values from a stub function when called multiple times in a UUT function.

Answer:

That is something like 1,3,5,7. Standard lists.

For more flexibility it can also be done in user code, but needs a state variable.

static int temp = 1;
<uut_prototype_stubs.function.return>> = temp;
temp += 2;

Example:

int uut_func(int a, int b) {
    int ret = 0;
    ret = funCA(a);
    if (ret == -1) {
        exit(1);
    }
    if(ret == 0) {
        ret = funcA(b);
    }
    if (ret == -1) {
        exit(1);
    }
}

 

How to return 0 and -1 for funcA to execute cover the false and true path for return of funcA?

The stub return needs to be 0,-1

 
Article Options
2020-05-13
Views: 46
Rate this article: