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'.

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.
Advanced search

Actual Value in User Code

Last updated: 2019-10-02

When I have an expected result in user code, the report only shows matched or fail. When it fails I need to know the actual value of the result.


There is an undocumented test harness function which allows this to happen. As an example we have in file uut.c the function func() which is stubbed.

int func(int p);
and an unstubbed function func2()
int func2()
  return …;

For the test case to pass, p must be the same as the value returned from func2(). We write expected value user code.

char actual[20];
int value = <<uut.func.p>>;
sprintf(actual, "%d", value );

  "<<uut.testfunc.p>> == func2() return",
  func2() == value,


Article Options
Views: 408
Rate this article: