Marian Buschsieweke
2b6f65a08a
build_system/xfa: change API to fix alignment
...
This changes the API of xfa from
XFA(array_name, prio) type element_name = INITIALIZER;
to
XFA(type, array_name, prio) element_name = INITIALIZER;
this allows forcing natural alignment of the type, fixing failing tests
on `native64`.
2024-11-07 16:30:01 +01:00
Benjamin Valentin
312a550f1a
treewide: remove THREAD_CREATE_STACKTEST from thread creation
2024-07-29 11:45:58 +02:00
Joshua DeWeese
b6481654ba
core/lib/cib: add several new peek functions
...
This patch adds calls to be able to peek at items other than just the
oldest item in a cib based FIFO. It also adds an "unsafe" peek to match
the existing "unsafe" put and get functions.
2024-03-18 10:14:34 -04:00
Joshua DeWeese
45752a3002
core/lib/cib: remove superfluous init
...
This patch removes a superfluous init of the cib. The struct is already
initialized by the test fixture's setup function.
2024-03-12 12:54:46 -04:00
Joshua DeWeese
45f865965f
core/lib/cib: remove magic number from unit test
2024-03-12 12:54:46 -04:00
Joshua DeWeese
fa7a577728
tests/unittests: add test for ABS() macro
2024-02-08 10:56:11 -05:00
Joshua DeWeese
b1cb2435d8
tests/unittests: add unit test for LIMIT() macro
2024-02-08 10:56:00 -05:00
Joshua DeWeese
8e3bbca8b5
tests/unittests: add tests for MAX()/MIN() macros
2024-02-08 10:55:37 -05:00
Dylan Laduranty
6499b698fa
tests/unittests: remove old workaround for SAML1X and gcc9.X bug
...
This reverts #13462 , this workaround is no longer needed with newer GCC version
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-05-30 21:44:22 +02:00
2c583851fa
tests/unittests: tests-core-mbox: add missing container.h
include
2023-05-02 13:57:44 +02:00
bors[bot]
096ed0048a
Merge #18950
...
18950: tests/unittests: add unit tests for core_mbox r=benpicco a=maribu
### Contribution description
As the title says
### Testing procedure
The test cases are run on `native` by Murdock anyway.
### Issues/PRs references
Split out of https://github.com/RIOT-OS/RIOT/pull/18949
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-01-03 22:19:39 +00:00
Marian Buschsieweke
9b3df5b4ff
tests/unittests: add unit tests for core_mbox
2022-12-09 14:47:11 +01:00
Karl Fessel
54ada3685a
tests: add missing includes
2022-11-22 13:39:35 +01:00
Karl Fessel
aa31dd7d66
core/macros: rewrite DIV_ROUND, DIV_ROUND_UP; add DIV_ROUND_INF
2022-11-09 17:59:18 +01:00
Karl Fessel
228d8e72c0
unittest/core-macros: add negtive cases for DIV_ROUND and DIV_ROUND_UP
2022-11-09 17:59:18 +01:00
Benjamin Valentin
8f8bb6ce84
tests/unittests: core: add test for SIGNOF(size_t)
2022-11-09 14:23:51 +01:00
Karl Fessel
c29d2f1afb
test/unittest: cleanup most vera++ complains
2022-10-27 16:31:59 +02:00
Benjamin Valentin
27b3c115d2
tests/unittests: add tests core math macros
2022-09-21 16:00:26 +02:00
Francisco
d7b3328601
Merge pull request #16098 from kfessel/p-remove-lifo
...
core/lifo: Remove lifo [after 2021.04]
2021-06-15 13:55:30 +02:00
Karl Fessel
5735d99971
core/clist: add special cardinality tests and matching unittest
...
adds clist_exactly_one() and clist_more_than_one()
and a unittest that tests them
2021-04-14 21:00:10 +02:00
f48aba5035
tests/unittests: add clist_is_empty() test case
2021-04-09 10:54:29 +02:00
Karl Fessel
f9649973d3
core/lifo: Remove lifo unittests
2021-02-27 11:59:36 +01:00
Joakim Nohlgård
12a2243485
unittests: Add XFA tests
2021-02-16 14:55:26 +01:00
2d551ec125
tests/core: Add tests for little endian functions
2020-12-08 11:26:20 +01:00
Marian Buschsieweke
eb1279005c
tests: Cleanup access to internal variables
...
Replace direct accesses to sched_active_thread and sched_active_pid with
the helper functions thread_getpid() and thread_get_active(). This serves
two purposes:
1. It makes accidental writes to those variable from outside core less likely.
2. Casting off the volatile qualifier is now well contained to those two
functions
2020-08-24 09:08:01 +02:00
benpicco
e2e51ae7ef
Merge pull request #14368 from jia200x/pr/byteorder_bebuftohs
...
core/byteorder: add uint32 from/to buffer funcs
2020-07-13 12:31:43 +02:00
Jose Alamos
2592dd7805
unittest/byteorder: add tests for uint32 from/to funcs
2020-07-13 11:21:31 +02:00
Leandro Lanzieri
4d65bc8e0a
cpu: Rename CPU_ARCH to CPU_CORE
2020-06-16 12:05:40 +02:00
dylad
fd984439a3
tests/unittests: fix GCC compiler bug in core-atomic for SAML1X
...
Co-Authored-By: benpicco <benpicco@googlemail.com>
2020-02-26 10:56:15 +01:00
MyCodeMyMoney
4167d4dd9b
tests/unittests/tests-core/tests-core-ringbuffer: test underflow
2020-01-07 12:56:17 +01:00
Benjamin Valentin
4918dfe590
tests: make use of ARRAY_SIZE macro
2019-08-06 19:43:54 +02:00
Hauke Petersen
eae103cbd7
unittests/core: added tests for clist_count
2019-03-23 23:47:25 +01:00
Dylan Laduranty
762e5251b4
tests/unittests: disable optimization for test_atomic_inc_rollover
...
Disable optimization for this function only with CPU_SAML1X MCUs due to an internal crosscompiler bug
2019-01-21 17:10:19 +01:00
PeterKietzmann
0ecaaf021c
core/bitarithm: add explicit 32-bit function
2018-10-08 13:57:21 +02:00
face869e3e
tests/unittests/core: add byteorder_bebuftohs(), byteorder_htobebufs() tests
2018-08-23 10:34:59 +02:00
Gaëtan Harter
64bc06f2b6
tests/unittests: add empty list clist_foreach case
...
Add clist_foreach empty list test case which should:
* not call `func`
* return `NULL`
2018-05-15 16:49:59 +02:00
a0077f3c4b
tests/unittests: test clist_foreach() return value
2018-05-12 00:13:41 +02:00
o0c
d7853ac87f
unittests: fix loop in tests-core-atomic
2018-02-26 14:52:05 +01:00
Martine Lenders
8d71f250d1
tests: add #8117 test case for cib.h unittests
2017-11-22 18:23:34 +01:00
Martine Lenders
56ec27cf6f
tests: adapt cib.h unittests for variable cib size
2017-11-22 18:23:07 +01:00
615b1e60bc
core/clist: add argument to clist_foreach
2017-11-06 12:49:22 +01:00
258f7b70f9
tests/unittests: add clist_sort() tests
2017-10-03 00:36:14 +02:00
Simon Brummer
68581a8fbe
core: bugfix: ringbuffer_remove
2017-03-01 22:01:26 +01:00
Joakim Nohlgård
cb34eed8f3
tests/unittests/core-atomic: Use stdatomic.h instead of custom atomic.h
2017-02-08 16:23:49 +01:00
Martine Lenders
b0a849c01c
tests: provide unittests for core/list
2017-01-24 14:15:48 +01:00
Oleg Hahm
7ee7801c10
*: remove trailing underscores from header guards
2017-01-19 18:30:53 +01:00
Martine Lenders
e16bbda5f6
Merge pull request #5629 from kaspar030/improve_clist
...
core: improve clist
2016-07-18 19:36:16 +02:00
d86c141842
core, tests: adapt to changed clist function names
2016-07-18 16:20:40 +02:00
Victor Arino
e84e2996f3
core/cib: add unittest for cib_peek
2016-07-18 08:57:44 +02:00
1bac3f3a2f
tests: unittests: adapt tests-core-clist to singly linked clist
2016-03-30 00:27:49 +02:00