mirror of https://github.com/ARMmbed/mbed-os.git
Remove `#ifdef UNITTEST` from MbedCRC.h
Production code should not contain any test-specific checks. Rather than checking `UNITTEST`, MbedCRC.h can simply include in all cases <mstd_type_traits> whose unit test stub exists. Also remove the `UNITTEST` macro from CMake definitions of kvstore unit tests which depend on MbedCRC.h.pull/14884/head
parent
dd81b536da
commit
9b8acca136
|
@ -29,12 +29,7 @@
|
|||
#include "platform/SingletonPtr.h"
|
||||
#include "platform/PlatformMutex.h"
|
||||
|
||||
#ifdef UNITTEST
|
||||
#include <type_traits>
|
||||
#define MSTD_CONSTEXPR_IF_HAS_IS_CONSTANT_EVALUATED
|
||||
#else
|
||||
#include <mstd_type_traits>
|
||||
#endif
|
||||
|
||||
namespace mbed {
|
||||
/** \addtogroup drivers-public-api */
|
||||
|
|
|
@ -7,7 +7,6 @@ add_executable(${TEST_NAME})
|
|||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
UNITTEST
|
||||
MBED_LFS_READ_SIZE=64
|
||||
MBED_LFS_PROG_SIZE=64
|
||||
MBED_LFS_BLOCK_SIZE=512
|
||||
|
|
|
@ -5,11 +5,6 @@ set(TEST_NAME tdbstore-unittest)
|
|||
|
||||
add_executable(${TEST_NAME})
|
||||
|
||||
target_compile_definitions(${TEST_NAME}
|
||||
PRIVATE
|
||||
UNITTEST
|
||||
)
|
||||
|
||||
target_sources(${TEST_NAME}
|
||||
PRIVATE
|
||||
${mbed-os_SOURCE_DIR}/storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
|
|
Loading…
Reference in New Issue