mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/unittests: improve int size detection
Deduce from the value of `INT_MAX` whether `int` is 16 bit or 32 bit, rather than check CPU names.
This commit is contained in:
parent
ef82aa6acc
commit
e0b5d63021
@ -8,6 +8,9 @@
|
||||
|
||||
#ifndef UNITTESTS_CONSTANTS_H
|
||||
#define UNITTESTS_CONSTANTS_H
|
||||
#include <limits.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "embUnit/embUnit.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -55,7 +58,7 @@ extern "C" {
|
||||
#define TEST_UINT64 (13500266397057512199LLU)
|
||||
#endif
|
||||
|
||||
#if defined(CPU_CC430) || defined(CPU_MSP430FXYZ) || defined(CPU_ATMEGA2560)
|
||||
#if INT_MAX == INT16_MAX
|
||||
#define TEST_INT TEST_INT16
|
||||
#else
|
||||
#define TEST_INT TEST_INT32
|
||||
|
Loading…
Reference in New Issue
Block a user