-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef2b96a
commit 9f076a9
Showing
6 changed files
with
177 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/**********************************************************\ | ||
This file is part of the | ||
https://github.com/morzhovets/momo | ||
project, distributed under the MIT License. See | ||
https://github.com/morzhovets/momo/blob/master/LICENSE | ||
for details. | ||
test/sources/LibcxxHashMapVPTesterLimP4.cpp | ||
\**********************************************************/ | ||
|
||
#include "pch.h" | ||
|
||
#ifdef TEST_LIBCXX_HASH_MAP | ||
|
||
#include "../../include/momo/details/HashBucketLimP4.h" | ||
|
||
//#define LIBCXX_TEST_BUCKET momo::HashBucketLimP4<> | ||
//#define LIBCXX_TEST_BUCKET_NAME "limp4" | ||
#define LIBCXX_TEST_DEFAULT_BUCKET | ||
|
||
//#include "LibcxxHashMapTester.h" | ||
|
||
#include "LibcxxTester.h" | ||
|
||
#include "../../include/momo/stdish/unordered_map.h" | ||
|
||
namespace | ||
{ | ||
|
||
using namespace libcxx_from_range_unord; | ||
|
||
class LibcxxHashMapSettings : public momo::HashMapSettings | ||
{ | ||
public: | ||
static const momo::CheckMode checkMode = momo::CheckMode::exception; | ||
}; | ||
|
||
namespace libcxx_test_hash_map_vp | ||
{ | ||
|
||
namespace std | ||
{ | ||
using namespace ::std; | ||
|
||
template<typename TKey, typename TMapped, | ||
typename THashFunc = std::hash<TKey>, | ||
typename TEqualFunc = std::equal_to<TKey>, | ||
typename TAllocator = std::allocator<std::pair<const TKey, TMapped>>> | ||
using unordered_map = momo::stdish::unordered_map<TKey, TMapped, THashFunc, TEqualFunc, TAllocator, | ||
momo::HashMap<TKey, TMapped, momo::HashTraitsStd<TKey, THashFunc, TEqualFunc>, | ||
momo::MemManagerStd<TAllocator>, | ||
momo::HashMapKeyValueTraits<TKey, TMapped, momo::MemManagerStd<TAllocator>, true>, | ||
LibcxxHashMapSettings>>; | ||
} | ||
|
||
#define LIBCXX_TEST_FAILURE | ||
#define LIBCXX_TEST_PREFIX "libcxx_test_hash_map_vp_limp4" | ||
#include "libcxx/UnorderedMapTests.h" | ||
#undef LIBCXX_TEST_PREFIX | ||
#undef LIBCXX_TEST_FAILURE | ||
|
||
} // namespace libcxx_test_hash_map_vp | ||
|
||
} // namespace | ||
|
||
#endif // TEST_LIBCXX_HASH_MAP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/**********************************************************\ | ||
This file is part of the | ||
https://github.com/morzhovets/momo | ||
project, distributed under the MIT License. See | ||
https://github.com/morzhovets/momo/blob/master/LICENSE | ||
for details. | ||
test/sources/LibcxxTreeMapVPTester.cpp | ||
\**********************************************************/ | ||
|
||
#include "pch.h" | ||
|
||
#ifdef TEST_LIBCXX_TREE_MAP | ||
|
||
#include "LibcxxTester.h" | ||
|
||
#include "../../include/momo/stdish/map.h" | ||
|
||
#include "../../include/momo/stdish/vector.h" | ||
|
||
namespace | ||
{ | ||
|
||
using namespace libcxx_from_range_assoc; | ||
|
||
namespace libcxx_test_tree_map_vp | ||
{ | ||
|
||
namespace std | ||
{ | ||
using namespace ::std; | ||
|
||
template<typename TKey, typename TMapped, | ||
typename TLessFunc = std::less<TKey>, | ||
typename TAllocator = std::allocator<std::pair<const TKey, TMapped>>> | ||
using map = momo::stdish::map<TKey, TMapped, TLessFunc, TAllocator, | ||
momo::TreeMap<TKey, TMapped, momo::TreeTraitsStd<TKey, TLessFunc, false, | ||
momo::TreeNode<32, 4, momo::MemPoolParams<>, false>>, | ||
momo::MemManagerStd<TAllocator>, | ||
momo::TreeMapKeyValueTraits<TKey, TMapped, momo::MemManagerStd<TAllocator>, true>, | ||
momo::TreeMapSettings>>; | ||
|
||
template<typename TKey> | ||
using vector = momo::stdish::vector<TKey>; | ||
} | ||
|
||
#define LIBCXX_TEST_PREFIX "libcxx_test_tree_map_vp" | ||
#include "libcxx/MapTests.h" | ||
#undef LIBCXX_TEST_PREFIX | ||
|
||
} // namespace libcxx_test_tree_map_vp | ||
|
||
} // namespace | ||
|
||
#endif // TEST_LIBCXX_TREE_MAP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/**********************************************************\ | ||
This file is part of the | ||
https://github.com/morzhovets/momo | ||
project, distributed under the MIT License. See | ||
https://github.com/morzhovets/momo/blob/master/LICENSE | ||
for details. | ||
test/sources/LibcxxTreeMultiMapVPTester.cpp | ||
\**********************************************************/ | ||
|
||
#include "pch.h" | ||
|
||
#ifdef TEST_LIBCXX_TREE_MAP | ||
|
||
#include "LibcxxTester.h" | ||
|
||
#include "../../include/momo/stdish/map.h" | ||
|
||
namespace | ||
{ | ||
|
||
using namespace libcxx_from_range_assoc; | ||
|
||
namespace libcxx_test_tree_multimap_vp | ||
{ | ||
|
||
namespace std | ||
{ | ||
using namespace ::std; | ||
|
||
template<typename TKey, typename TMapped, | ||
typename TLessFunc = std::less<TKey>, | ||
typename TAllocator = std::allocator<std::pair<const TKey, TMapped>>> | ||
using multimap = momo::stdish::multimap<TKey, TMapped, TLessFunc, TAllocator, | ||
momo::TreeMap<TKey, TMapped, momo::TreeTraitsStd<TKey, TLessFunc, true, | ||
momo::TreeNode<4, 2, momo::MemPoolParams<1>, true>>, | ||
momo::MemManagerStd<TAllocator>, | ||
momo::TreeMapKeyValueTraits<TKey, TMapped, momo::MemManagerStd<TAllocator>, true>, | ||
momo::TreeMapSettings>>; | ||
} | ||
|
||
#define LIBCXX_TEST_PREFIX "libcxx_test_tree_multimap_vp" | ||
#include "libcxx/MultiMapTests.h" | ||
#undef LIBCXX_TEST_PREFIX | ||
|
||
} // namespace libcxx_test_tree_multimap_vp | ||
|
||
} // namespace | ||
|
||
#endif // TEST_LIBCXX_TREE_MAP |