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
C++ Unit Testing
document
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: 36
document
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: 21
document
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: 19
document
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: 17
document
2019-10-24 Accessing Third Parameter of a Variadic ioctl Stubbed Function
Question: How to access the 3rd parameter of a variadic ioctl stubbed function? Answer: For example, let's assume that your ioctl is declared as: int ioctl(int fd, int function, ...); If your ioctl() has different parameter names, substitute those names instead in the...
2019-10-24 rating Views: 11
document
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: 11
document
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: 10
document
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: 9
document
2019-11-11 Stubbing Operator New in Environment
Question: I would like to use the new operator in order to test an exception in my code. How do I force the 'new' operator to be stubbed in VectorCAST? Answer: There is a way to force operator new to be stubbed. It involves pre-declaring it in unit prefix user code (Environment | User Code |...
2019-11-11 rating Views: 9
document
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: 9