mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
This change allows mocking of error/abort macros in unit tests. Being able to do this in unit tests, enables us to test error conditions w/o terminating the unit test runner. The new error functions do not have "noreturn" attribute because this would make mocking of them in unit tests impossible. We must not compile these functions as noreturn because we need to return from them in unit tests and returning from a noreturn function is an undefined behavior in the C++ standard! For more details: - ISO/IEC 14882:2017, Chapter 10.6.8 "Noreturn attribute"" - https://en.cppreference.com/w/cpp/language/attributes/noreturn. Signed-off-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
17 KiB
17 KiB