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
Lingkai Dong 2021-07-06 17:26:55 +01:00
parent dd81b536da
commit 9b8acca136
3 changed files with 0 additions and 11 deletions

View File

@ -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 */

View File

@ -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

View File

@ -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