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
C++ Unit Testing
2019-12-03 Initialize an Array of Structures before Running a Test Case
This example will demonstrate how to initialize a global array of structures, before running a test case. The example function totals up the elements of an array of structures. Here is some example code where add_struct() is the function under test: // Start of Example struct basicStruct...
2019-12-03 rating Views: 86
2019-10-31 Using Python and XPath to Extract Report Data
VectorCAST reports contain all of the information you need to see how your test cases have run. But in some cases it may be desirable to pull out specific portions of the reports for use in external tools. For example, Jenkins has the ability to gather and report specific data metrics from job...
2019-10-31 rating Views: 79
2019-11-14 Creating Variables within Test Cases
Question: Is there a way to create a variable within a testcase to determine the number of times that a particular stub was called? Answer: Yes, you can add a variable to the VectorCAST User Globals by selecting Environment | User Code | Edit. Any variables added in this location will...
2019-11-14 rating Views: 68
2019-12-04 Stubbing Different Library Functions on Test Case by Test Case Basis
Question: Is it possible to have different library functions stubbed out/not stubbed on a test case by test case basis without rebuilding the environment? Answer: The library stubs feature is for _all_ the library functions that you might want "stubbed" in test cases in your environment. If...
2019-12-04 rating Views: 47
2019-11-13 Testing Code Containing Infinite Loops
Question: My source code contains an infinite loop? Is there a way to break out of the infinite loop while unit testing with VectorCAST? Answer: 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...
2019-11-13 rating Views: 46
2019-10-29 Compound Test Cases: Initialization Code and Complex Preconditions
Question: How do I call initialization code or set up complex preconditions for a compound test case? Answer: Compound test cases are often used to test scenarios that require non-trivial initialization. For example, a test that exercises a state machine may require one or more function calls...
2019-10-29 rating Views: 43
2019-11-11 VectorCAST Stub Functions Without a Prototype
Question: Can VectorCAST stub functions without a prototype? Answer: By default, VectorCAST will not stub functions that lack a valid prototype. If a function without a prototype is used but not defined, this will result in a link error when building the environment. The...
2019-11-11 rating Views: 39
2019-10-31 Exit Test Harness Cleanly when Calling a Stubbed Function
Question: Is there a way to make VectorCAST exit the test harness cleanly when calling a stubbed function? Answer: Yes, in configure stubs user code (Environment | Configure Stubs | Edit) for the stubbed function, insert the following code: void VCAST_driver_termination(int status,...
2019-10-31 rating Views: 38
2019-11-04 Object Initialization User Code
Object initialization user code serves two purposes. The first is to provide initial values to global constants and global references. The second to create the member initializer section of constructors that are defined by VectorCAST. Global object example: If a declaration looked like the...
2019-11-04 rating Views: 38
2019-10-24 Compile Errors when Stubbing Built-in Library Functions
Issue: I get a compiler error when I try to build the test harness with built-in library functions stubbed Solution: A user may wish to stub a C built-in library function using the Library Stubs. If the name of the stubbed function is used elsewhere in the user's code for a different purpose,...
2019-10-24 rating Views: 35