1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

4 Commits

Author SHA1 Message Date
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
Marian Buschsieweke
6615f47b90
tests/unittests: Add tests for endian.h 2024-01-30 12:24:12 +01:00
Benjamin Valentin
55dc66e942 tests/unittests: libc: add test for memchk() 2023-05-30 20:40:28 +02:00
Benjamin Valentin
3fc4d9d98c tests/unittests: add tests for libc module 2022-09-26 19:06:46 +02:00