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

Handling Uninitialized Input Values in Test Cases

Last updated: 2019-11-13
What value will VectorCAST assign to uninitialized input values in test cases?
The automatically generated VectorCAST harness code does not do any initialization of test case input values that are not explicitly set in the test case. This is intentional, and allows for several different usage scenarios. Among these:
  1. It allows testing of "real world" behavior when functions are called with uninitialized data 
  2. It allows test cases to "inherit" data from previously executed code (i.e. startup code, initialization user code, or previous slots in a compound test case)
Despite the fact that VectorCAST code does not initialize these parameters, however, there are several factors that may influence the initialization of test case parameters: 


  1. In most operating environments, the processor startup code, operating system and/or C library will clear BSS and heap memory (as well as possibly other areas of memory) prior to main(). 
  2. For C++, the language standard explicitly requires that all uninitialized globals be initialized to zero prior to main(). 
  3. Certain VectorCAST features such as user code and automatic initialization test cases can be used to initialize memory and/or input parameters prior to execution of a test case. 

All of these behaviors are highly environment dependent, however, it is generally best not to assume that uninitialized values have any particular value. For example, some compilers do not automatically clear memory on startup, and instead leave that up to the end user. In such cases you will need to link extra startup code into your VectorCAST environment to create this behavior. (In most cases you can copy this startup code from your application.)

Another thing to consider with regards to uninitialized input values is whether the test case is the first one to run in the test harness. As mentioned above, some features of VectorCAST -- like compound test cases and range/list iterations -- allow multiple executions of test case or different test cases within a single harness execution. In these scenarios only the first test case executed will get the "default" values for uninitialized inputs. Subsequent test case executions will "inherit" any parameter values modified by previous test cases (neither the target nor the test harness are reset during the compound execution). This behavior is useful for setting up complex test scenarios, but can occasionally be confusing for users unfamiliar with the tools. 

So to summarize, if your test case depends on a value, you should explicitly set that value in the test case's "Input Values" column.
Article Options
Views: 59