Function
This test section is available only for unit tests, which means
testing of a single function in testIDEA. For this kind of
tests, target stack is modified in a way, which enables calling of the
specified function, and stopping execution when the function
returns.
This page contains the most important part of unit test specification -
the name of the function to be tested, and its parameters.
It is recommended that winIDEA has symbols loaded
and testIDEA is connected to winIDEA. This way content
assistance is available, and function prototypes are shown in
testIDEA.
Timeout specifies when testIDEA terminates test case
execution, if it does not end normally. See tooltip for more details.
Fully qualified function names
If there are multiple download files, or we use file static
functions, multiple functions with the same name may exist. To
define the exact function, we can use the extended syntax for
function naming:
"<moduleName>#"<functionName>,,<downloadFile>
where:
-
moduleName
- name of the C source file, which
contains the function (optional)
-
functionName
- name of the function
-
downloadFileName
- name of the download file,
where the function is located
Example:
"calc.c#"add,,math.elf
The source file name is needed only for file static functions, for
all other functions we can specify only download file, for example:
add,,math.elf
The setting for using fully qualified or simple function names in
content proposals is located in testIDEA File |
Properties | General
dialog, check-box Use qualified
function names.
Inlined functions
There exists also special notation for inlined functions, which
specifies hex address, "###" and function name, for example:
"080023AA###"calculate
Since these are not regular functions, they can not be used by testIDEA
as tested functions, stubs, user stubs, or profiler areas.
Overloaded functions and methods
To specify which of overloaded functions has to be tested, add
also list of parameter types to function name, for example:
"Vehicle.cpp#"testOverloads(long,long)
Name of the source file is not mandatory.