1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/cpp_ctors/README.md
Gaëtan Harter 5638881e5b
tests/cpp_ctors: move tests-cpp_ctors out of unittests
This moves 'unittests/tests-cpp_ctors' to its own test.
It prevents requiring 'cpp' in the 'unittests' that forced almost all
architectures to link the unittests with `g++`.
It also removes the need to have disabled tests for architectures.

Some boards were actually not big enough to compile unittests.
But were hidden by the 'cpp' missing feature.

Blacklist boards that were disabled for cpp test even though they
provide the 'cpp' feature.
2019-08-22 12:39:47 +02:00

19 lines
932 B
Markdown

The purpose of this test is to ensure that C++ constructors are executed
properly during the startup of RIOT. This requires that the port calls
constructors somewhere during C-library initialization. On newlib ports this is
done by __libc_init_array(), other ports may need to manually iterate through
the list of initializer functions (usually .init_array), and call each one in
order.
There are three tests:
- Global constructor
- Static constructor
- Local constructor
The global constructor test checks to see if the constructor of a global object
has been run during the boot process. The static constructor test does the
same, but for static object inside a function. The local constructor test checks
that a locally created object does have its constructor run.
The local constructor test will only fail if there is a significant problem with
the C++ tool chain, since it does not rely on any external C++ support code.