mirror of
https://github.com/ETLCPP/etl.git
synced 2026-10-28 18:07:10 +08:00
Added mutex traits
Added transparent comparator test to multimap
This commit is contained in:
parent
e44d1ad01d
commit
05e85b9e90
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -1462,6 +1462,9 @@ namespace
|
||||
|
||||
std::string a("A");
|
||||
Key b("B");
|
||||
|
||||
CHECK(compare(a, b));
|
||||
CHECK(!compare(b, a));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user