1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/unittests/tests-libc
Marian Buschsieweke e5f69206ad
sys/libc/endian.h: fix magic constants
The constants BIG_ENDIAN etc. were not consistently defined. This
bug was not caught by the unit tests, as the preprocessor would
treat undefined macros as being `0` in numeric comparisons, hence
the following test did select the correct implementation:

```C
#if BYTE_ORDER == LITTLE_ENDIAN
/* correct implementation for all currently supported boards */
#endif
```

This adds now an explicit test to the unit tests to ensure that the
magic numbers are consistently the correct values. Hence, this bug
should no longer be able to sneak in.

Co-authored-by: Teufelchen <9516484+Teufelchen1@users.noreply.github.com>
2024-01-31 14:46:24 +01:00
..
Makefile tests/unittests: add tests for libc module 2022-09-26 19:06:46 +02:00
tests-libc.c sys/libc/endian.h: fix magic constants 2024-01-31 14:46:24 +01:00
tests-libc.h tests/unittests: add tests for libc module 2022-09-26 19:06:46 +02:00