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

Testing Code Containing Infinite Loops

Last updated: 2019-11-13
My source code contains an infinite loop? Is there a way to break out of the infinite loop while unit testing with VectorCAST?
Probe Points are a great way test infinite loops.

We can insert a “break” into the code to force it to terminate after one iteration, or any number of iterations we choose.

Let us take a look at the number of ways we can do it.
  • In method 1; I want to only run the loop once. The easiest and quickest way is to put a break in at the end of the loop with my probe point.  
  • In method 2; I want to get a number of results, I can set a static count to run the loop 10 times and output certain private member variable values for each loop.
  • In method 3; I have declared some user code in the environment user code. My probe point will check the value of the user prefix user code and break when the conditions are right.
Article Options
Views: 125