-
Notifications
You must be signed in to change notification settings - Fork 4
deUnit_Configuration
It is possible to adjust the behavior of deUnit by setting Macros.
Is this define set to <1> the deUnit framework is "active"
This has following effects:
adds:
test result buffer <SIZE_OF_RESULT_BUFFER>
optin and optout filter <SIZE_OF_TEST_FILTER>
WRITE_FILE_NAME
WRITE_CLASS_NAME
WRITE_TEST_NAME
if <disableBreakMode()> has not been called before invoking <invokeAllTest()> deUnit blocks in <MessageToDebugger> and requires the gdb to increase the program counter by 2.
Adds configuration:
SIZE_OF_RESULT_BUFFER
SIZE_OF_TEST_FILTER
WRITE_FILE_NAME
WRITE_CLASS_NAME
WRITE_TEST_NAME
Adds RAM Usage
5 Byte(buffer index + bitshift)
SizeOfBuffer
SizeOfFilter X2
Build in Self Test Mode.
enables the user to define callback function for:
print test result <eUnit_SetPrintFunction()>
on fail/success/init/end
This mode adds just callback function and works with or without EUNIT_TESTMODE Adds RAM Usage
40 Byte for callback functions
Use software Breakpoints instead to increase the amount of possible dependencys.
Is this define == 1 the deUnit-Framework uses Software breakpoints. Otherwise the framework rely on the GDB Manipulator(gdbMann) to set hardware breakpoints.
Embedded devices do only have a limited amount of hw- breakpoints.
--> less mocks and stubs that can be defined simultaneously
Software breakpoints assembly command to stop the execution
--> application stops even if the gdbManipulator is not connected
Use long jump to return from failed ASSERT if <EUNIT_LONGJUMP> == 1
This macro intends to return from fail tests even if they have nested functions calls with assets
if EUNIT_LONGJUMP == 1 the Assert macro expect that the test file defines
the variable "static jmp_buf env" as longJump variable
If one Assert Failes the assert returns the Macro with
"longjmp (env,1)"
The test case needs this code before execution the first assert:
val = setjmp (env);
if(val) {
return 1; // one test has failed
}
Is <EUNIT_LONGJUMP> != 1 the Assert Macros returns just with a "return 1;"
Size of the target result buffer. Adds RAM Usage
<SIZE_OF_RESULT_BUFFER>
The smaller the buffer is, the more often the buffer has to be read
This Makro defines the size of test filters. Adds RAM Usage
2x <SIZE_OF_TEST_FILTER>
This macro is used in the test cases to reduce the memory footprint and the test execution time by preventing the compiler to add the src-file name to the binary.
If <WRITE_FILE_NAME> != 1 the file names does not get added.
This macro is used in the test cases to reduce the memory footprint and the test execution time by preventing the compiler to add the class names to the binary and to the target_result_buffer.
If <WRITE_CLASS_NAME> != 1 the class names names does not get added.
This makro is used in the test cases to reduce the memory footprint and the test execution time by preventing the compiler to add the test names to the binary and to the target_result_buffer.
If <WRITE_TEST_NAME> != 1 the test names does not get added.