Added mutex traits

Added transparent comparator test to multimap
This commit is contained in:
John Wellbelove 2022-04-21 11:57:55 +02:00
parent e44d1ad01d
commit 05e85b9e90
3 changed files with 14 additions and 0 deletions

View File

@ -53,4 +53,12 @@ SOFTWARE.
#define ETL_HAS_MUTEX 0
#endif
namespace etl
{
namespace traits
{
static ETL_CONSTANT bool has_mutex = (ETL_HAS_MUTEX == 1);
}
}
#endif

View File

@ -33,6 +33,8 @@ SOFTWARE.
#include "etl/platform.h"
#include "etl/version.h"
#include "etl/char_traits.h"
#include "etl/mutex.h"
namespace
{
SUITE(test_etl_traits)
@ -60,6 +62,7 @@ namespace
CHECK_EQUAL((ETL_USING_8BIT_TYPES == 1), etl::traits::has_8bit_types);
CHECK_EQUAL((ETL_USING_64BIT_TYPES == 1), etl::traits::has_64bit_types);
CHECK_EQUAL((ETL_HAS_ATOMIC == 1), etl::traits::has_atomic);
CHECK_EQUAL((ETL_HAS_MUTEX == 1), etl::traits::has_mutex);
CHECK_EQUAL((ETL_HAS_NULLPTR == 1), etl::traits::has_nullptr);
CHECK_EQUAL((ETL_HAS_CHAR8_T == 1), etl::traits::has_char8_t);
CHECK_EQUAL((ETL_HAS_NATIVE_CHAR8_T == 1), etl::traits::has_native_char8_t);

View File

@ -1462,6 +1462,9 @@ namespace
std::string a("A");
Key b("B");
CHECK(compare(a, b));
CHECK(!compare(b, a));
}
//*************************************************************************