diff --git a/components/unity/Kconfig b/components/unity/Kconfig index 4a8779fc92..72952c1e53 100644 --- a/components/unity/Kconfig +++ b/components/unity/Kconfig @@ -13,6 +13,14 @@ menu "Unity unit testing library" help If not set, assertions on double arguments will not be available. + config UNITY_ENABLE_64BIT + bool "Support for 64-bit integer types" + default n + help + If not set, assertions on 64-bit integer types will always fail. + If this feature is enabled, take care not to pass pointers (which are 32 bit) + to UNITY_ASSERT_EQUAL, as that will cause pointer-to-int-cast warnings. + config UNITY_ENABLE_COLOR bool "Colorize test output" default n diff --git a/components/unity/include/unity_config.h b/components/unity/include/unity_config.h index 8ebd88f293..32f9719008 100644 --- a/components/unity/include/unity_config.h +++ b/components/unity/include/unity_config.h @@ -21,13 +21,16 @@ #define UNITY_EXCLUDE_DOUBLE #endif //CONFIG_UNITY_ENABLE_DOUBLE +#ifdef CONFIG_UNITY_ENABLE_64BIT +#define UNITY_SUPPORT_64 +#endif + #ifdef CONFIG_UNITY_ENABLE_COLOR #define UNITY_OUTPUT_COLOR #endif #define UNITY_EXCLUDE_TIME_H - void unity_flush(void); void unity_putc(int c); void unity_gets(char* dst, size_t len);