Compare commits

..

6 Commits

Author SHA1 Message Date
Peter Dimov 6c24c30c42 Update test/CMakeLists.txt 2023-06-25 18:20:36 +03:00
Christian Mazakas 0d2eaa0b21 Add explicit tests for rw_spinlock 2023-06-25 13:05:10 +03:00
joaquintides 6ee93f17e4 [skip ci] updated boost::unordered_(flat|node)_map benchmarks 2023-06-22 19:21:02 +02:00
joaquintides 7e41e08a57 updated boost::concurrent_flat_map benchmarks 2023-06-22 09:02:24 +02:00
Christian Mazakas 7a6c8eca09 Merge pull request #194 from boostorg/fix/extra-semicolon
Remove extraneous semicolons
2023-06-21 15:35:05 -07:00
Christian Mazakas dce386068b Remove extraneous semicolons 2023-06-21 07:46:53 -07:00
82 changed files with 84 additions and 108 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 52 KiB

+6 -6
View File
@@ -298,7 +298,7 @@ The successful lookup benchmarks are done by looking up all `n` values, in their
The unsuccessful lookup benchmarks use `n` randomly generated integers but using a different seed value.
=== GCC 11, x64
=== GCC 12, x64
[caption=]
@@ -317,7 +317,7 @@ h|unsuccessful lookup
|===
=== Clang 12, x64
=== Clang 15, x64
[caption=]
@@ -336,7 +336,7 @@ h|unsuccessful lookup
|===
=== Visual Studio 2019, x64
=== Visual Studio 2022, x64
[caption=]
@@ -374,7 +374,7 @@ h|unsuccessful lookup
|===
=== GCC 11, x86
=== GCC 12, x86
[caption=]
@@ -393,7 +393,7 @@ h|unsuccessful lookup
|===
=== Clang 12, x86
=== Clang 15, x86
[caption=]
@@ -412,7 +412,7 @@ h|unsuccessful lookup
|===
=== Visual Studio 2019, x86
=== Visual Studio 2022, x86
[caption=]
@@ -662,7 +662,7 @@ namespace boost {
float max_load_factor() const noexcept
{
return table_.max_load_factor();
};
}
void max_load_factor(float) {}
size_type max_load() const noexcept { return table_.max_load(); }
+1 -1
View File
@@ -285,7 +285,7 @@ struct group15
std::size_t pos=reinterpret_cast<uintptr_t>(pc)%sizeof(group15);
group15 *pg=reinterpret_cast<group15*>(pc-pos);
return !pg->is_not_overflowed(*pc);
};
}
inline int match_available()const
{
@@ -1624,7 +1624,7 @@ namespace boost {
typedef std::ptrdiff_t difference_type;
typedef std::forward_iterator_tag iterator_category;
iterator() : p(), itb(){};
iterator() : p(), itb(){}
reference operator*() const BOOST_NOEXCEPT { return dereference(); }
pointer operator->() const BOOST_NOEXCEPT
@@ -1715,7 +1715,7 @@ namespace boost {
typedef std::ptrdiff_t difference_type;
typedef std::forward_iterator_tag iterator_category;
c_iterator() : p(), itb(){};
c_iterator() : p(), itb(){}
c_iterator(iterator<Node, Bucket> it) : p(it.p), itb(it.itb) {}
reference operator*() const BOOST_NOEXCEPT { return dereference(); }
@@ -3393,7 +3393,7 @@ namespace boost {
}
}
buckets_.unlink_empty_buckets();
BOOST_RETHROW;
BOOST_RETHROW
}
BOOST_CATCH_END
+1 -1
View File
@@ -20,7 +20,7 @@ function(foa_tests)
endfunction()
function(cfoa_tests)
boost_test(PREFIX boost_unordered_cfoa LINK_LIBRARIES Threads::Threads ${ARGN})
boost_test(PREFIX boost_unordered_cfoa LINK_LIBRARIES Boost::compat Threads::Threads ${ARGN})
endfunction()
# FCA tests
+26 -50
View File
@@ -6,38 +6,14 @@
#include "helpers.hpp"
#include <boost/unordered/detail/foa/rw_spinlock.hpp>
#ifdef BOOST_GCC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#pragma GCC diagnostic ignored "-Wshadow"
#endif
#ifdef BOOST_CLANG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wsign-conversion"
#pragma clang diagnostic ignored "-Wshorten-64-to-32"
#endif
#include <boost/thread/locks.hpp>
#include <boost/thread/lock_types.hpp>
#ifdef BOOST_GCC
#pragma GCC diagnostic pop
#endif
#ifdef BOOST_CLANG
#pragma GCC diagnostic pop
#endif
#include <boost/compat/shared_lock.hpp>
#include <mutex>
#include <shared_mutex>
#include <thread>
using boost::unordered::detail::foa::rw_spinlock;
static int lcount = 0;
static int count = 0;
UNORDERED_AUTO_TEST (rw_spinlock_test) {
rw_spinlock sp, sp2;
@@ -85,12 +61,12 @@ void f(rw_spinlock& sp, int n)
{
for (int i = 0; i < n; ++i) {
std::lock_guard<rw_spinlock> lock(sp);
++lcount;
++count;
}
}
UNORDERED_AUTO_TEST (rw_spinlock_test3) {
lcount = 0;
count = 0;
rw_spinlock sp;
@@ -107,7 +83,7 @@ UNORDERED_AUTO_TEST (rw_spinlock_test3) {
th[i].join();
}
BOOST_TEST_EQ(lcount, N * M);
BOOST_TEST_EQ(count, N * M);
}
UNORDERED_AUTO_TEST (rw_spinlock_test4) {
@@ -123,8 +99,8 @@ UNORDERED_AUTO_TEST (rw_spinlock_test4) {
{
std::lock_guard<rw_spinlock> lock(sp);
boost::shared_lock<rw_spinlock> lock2(sp2);
boost::shared_lock<rw_spinlock> lock3(sp2);
boost::compat::shared_lock<rw_spinlock> lock2(sp2);
boost::compat::shared_lock<rw_spinlock> lock3(sp2);
}
}
@@ -150,7 +126,7 @@ UNORDERED_AUTO_TEST (rw_spinlock_test5) {
}
{
boost::shared_lock<rw_spinlock> lock(sp);
boost::compat::shared_lock<rw_spinlock> lock(sp);
BOOST_TEST(!sp.try_lock());
BOOST_TEST(sp.try_lock_shared());
sp.unlock_shared();
@@ -158,7 +134,7 @@ UNORDERED_AUTO_TEST (rw_spinlock_test5) {
}
UNORDERED_AUTO_TEST (rw_spinlock_test6) {
lcount = 0;
count = 0;
rw_spinlock sp;
@@ -172,16 +148,16 @@ UNORDERED_AUTO_TEST (rw_spinlock_test6) {
th[i] = std::thread([n, &sp] {
for (;;) {
{
boost::shared_lock<rw_spinlock> lock(sp);
if (lcount >= n)
boost::compat::shared_lock<rw_spinlock> lock(sp);
if (count >= n)
break;
}
{
std::lock_guard<rw_spinlock> lock(sp);
if (lcount >= n)
if (count >= n)
break;
++lcount;
++count;
}
}
});
@@ -191,7 +167,7 @@ UNORDERED_AUTO_TEST (rw_spinlock_test6) {
th[i].join();
}
BOOST_TEST_EQ(lcount, N);
BOOST_TEST_EQ(count, N);
}
UNORDERED_AUTO_TEST (rw_spinlock_test7) {
@@ -209,16 +185,16 @@ UNORDERED_AUTO_TEST (rw_spinlock_test7) {
int oldc;
{
boost::shared_lock<rw_spinlock> lock(sp);
if (lcount >= n)
boost::compat::shared_lock<rw_spinlock> lock(sp);
if (count >= n)
break;
oldc = lcount;
oldc = count;
}
{
std::lock_guard<rw_spinlock> lock(sp);
if (lcount == oldc)
++lcount;
if (count == oldc)
++count;
}
}
});
@@ -228,11 +204,11 @@ UNORDERED_AUTO_TEST (rw_spinlock_test7) {
th[i].join();
}
BOOST_TEST_EQ(lcount, N);
BOOST_TEST_EQ(count, N);
}
UNORDERED_AUTO_TEST (rw_spinlock_test8) {
lcount = 0;
count = 0;
rw_spinlock sp;
@@ -252,8 +228,8 @@ UNORDERED_AUTO_TEST (rw_spinlock_test8) {
for (;;) {
{
boost::shared_lock<rw_spinlock> lock(sp);
oldc = lcount;
boost::compat::shared_lock<rw_spinlock> lock(sp);
oldc = count;
}
if (oldc % m == k)
@@ -262,8 +238,8 @@ UNORDERED_AUTO_TEST (rw_spinlock_test8) {
{
std::lock_guard<rw_spinlock> lock(sp);
if (lcount == oldc)
++lcount;
if (count == oldc)
++count;
}
}
});
@@ -273,7 +249,7 @@ UNORDERED_AUTO_TEST (rw_spinlock_test8) {
th[i].join();
}
BOOST_TEST_EQ(lcount, N * M);
BOOST_TEST_EQ(count, N * M);
}
RUN_TESTS()
+4 -4
View File
@@ -84,7 +84,7 @@ void insert_exception_test(T*, Inserter insert, test::random_generator gen)
test::random_values<T> v(10, gen);
T x;
EXCEPTION_LOOP(insert_exception_test_impl(x, generate(insert, x), v));
EXCEPTION_LOOP(insert_exception_test_impl(x, generate(insert, x), v))
}
}
@@ -100,7 +100,7 @@ void insert_rehash_exception_test(
rehash_prep(x);
test::random_values<T> v2(5, gen);
EXCEPTION_LOOP(insert_exception_test_impl(x, generate(insert, x), v2));
EXCEPTION_LOOP(insert_exception_test_impl(x, generate(insert, x), v2))
}
}
@@ -458,7 +458,7 @@ void insert_range_exception_test(T*, test::random_generator gen)
test::random_values<T> v(10, gen);
T x;
EXCEPTION_LOOP(insert_range_exception_test_impl(x, v));
EXCEPTION_LOOP(insert_range_exception_test_impl(x, v))
}
}
@@ -470,7 +470,7 @@ void insert_range_rehash_exception_test(T*, test::random_generator gen)
rehash_prep(x);
test::random_values<T> v2(5, gen);
EXCEPTION_LOOP(insert_range_exception_test_impl(x, v2));
EXCEPTION_LOOP(insert_range_exception_test_impl(x, v2))
}
}
+1 -1
View File
@@ -89,7 +89,7 @@ namespace test {
}
}
#endif
};
}
// Check that size matches up.
+34 -34
View File
@@ -53,7 +53,7 @@ namespace test {
{
UNORDERED_SCOPE(object::object())
{
UNORDERED_EPOINT("Mock object default constructor.");
UNORDERED_EPOINT("Mock object default constructor.")
}
}
@@ -61,7 +61,7 @@ namespace test {
{
UNORDERED_SCOPE(object::object(int))
{
UNORDERED_EPOINT("Mock object constructor by value.");
UNORDERED_EPOINT("Mock object constructor by value.")
}
}
@@ -70,7 +70,7 @@ namespace test {
{
UNORDERED_SCOPE(object::object(object))
{
UNORDERED_EPOINT("Mock object copy constructor.");
UNORDERED_EPOINT("Mock object copy constructor.")
}
}
@@ -85,7 +85,7 @@ namespace test {
UNORDERED_SCOPE(object::operator=(object))
{
tag1_ = x.tag1_;
UNORDERED_EPOINT("Mock object assign operator 1.");
UNORDERED_EPOINT("Mock object assign operator 1.")
tag2_ = x.tag2_;
// UNORDERED_EPOINT("Mock object assign operator 2.");
}
@@ -96,7 +96,7 @@ namespace test {
{
UNORDERED_SCOPE(operator==(object, object))
{
UNORDERED_EPOINT("Mock object equality operator.");
UNORDERED_EPOINT("Mock object equality operator.")
}
return x1.tag1_ == x2.tag1_ && x1.tag2_ == x2.tag2_;
@@ -106,7 +106,7 @@ namespace test {
{
UNORDERED_SCOPE(operator!=(object, object))
{
UNORDERED_EPOINT("Mock object inequality operator.");
UNORDERED_EPOINT("Mock object inequality operator.")
}
return !(x1.tag1_ == x2.tag1_ && x1.tag2_ == x2.tag2_);
@@ -150,7 +150,7 @@ namespace test {
{
UNORDERED_SCOPE(hash::object())
{
UNORDERED_EPOINT("Mock hash default constructor.");
UNORDERED_EPOINT("Mock hash default constructor.")
}
}
@@ -158,7 +158,7 @@ namespace test {
{
UNORDERED_SCOPE(hash::hash(hash))
{
UNORDERED_EPOINT("Mock hash copy constructor.");
UNORDERED_EPOINT("Mock hash copy constructor.")
}
}
@@ -166,9 +166,9 @@ namespace test {
{
UNORDERED_SCOPE(hash::operator=(hash))
{
UNORDERED_EPOINT("Mock hash assign operator 1.");
UNORDERED_EPOINT("Mock hash assign operator 1.")
tag_ = x.tag_;
UNORDERED_EPOINT("Mock hash assign operator 2.");
UNORDERED_EPOINT("Mock hash assign operator 2.")
}
return *this;
}
@@ -177,7 +177,7 @@ namespace test {
{
UNORDERED_SCOPE(hash::operator()(object))
{
UNORDERED_EPOINT("Mock hash function.");
UNORDERED_EPOINT("Mock hash function.")
}
return hash_impl(x);
@@ -187,7 +187,7 @@ namespace test {
{
UNORDERED_SCOPE(hash::operator()(std::pair<object, object>))
{
UNORDERED_EPOINT("Mock hash pair function.");
UNORDERED_EPOINT("Mock hash pair function.")
}
return hash_impl(x.first) * 193ul + hash_impl(x.second) * 97ul + 29ul;
@@ -214,7 +214,7 @@ namespace test {
{
UNORDERED_SCOPE(operator==(hash, hash))
{
UNORDERED_EPOINT("Mock hash equality function.");
UNORDERED_EPOINT("Mock hash equality function.")
}
return x1.tag_ == x2.tag_;
}
@@ -223,7 +223,7 @@ namespace test {
{
UNORDERED_SCOPE(hash::operator!=(hash, hash))
{
UNORDERED_EPOINT("Mock hash inequality function.");
UNORDERED_EPOINT("Mock hash inequality function.")
}
return x1.tag_ != x2.tag_;
}
@@ -300,7 +300,7 @@ namespace test {
{
UNORDERED_SCOPE(equal_to::equal_to())
{
UNORDERED_EPOINT("Mock equal_to default constructor.");
UNORDERED_EPOINT("Mock equal_to default constructor.")
}
}
@@ -308,7 +308,7 @@ namespace test {
{
UNORDERED_SCOPE(equal_to::equal_to(equal_to))
{
UNORDERED_EPOINT("Mock equal_to copy constructor.");
UNORDERED_EPOINT("Mock equal_to copy constructor.")
}
}
@@ -316,9 +316,9 @@ namespace test {
{
UNORDERED_SCOPE(equal_to::operator=(equal_to))
{
UNORDERED_EPOINT("Mock equal_to assign operator 1.");
UNORDERED_EPOINT("Mock equal_to assign operator 1.")
tag_ = x.tag_;
UNORDERED_EPOINT("Mock equal_to assign operator 2.");
UNORDERED_EPOINT("Mock equal_to assign operator 2.")
}
return *this;
}
@@ -327,7 +327,7 @@ namespace test {
{
UNORDERED_SCOPE(equal_to::operator()(object, object))
{
UNORDERED_EPOINT("Mock equal_to function.");
UNORDERED_EPOINT("Mock equal_to function.")
}
return equal_impl(x1, x2);
@@ -339,7 +339,7 @@ namespace test {
UNORDERED_SCOPE(equal_to::operator()(
std::pair<object, object>, std::pair<object, object>))
{
UNORDERED_EPOINT("Mock equal_to function.");
UNORDERED_EPOINT("Mock equal_to function.")
}
return equal_impl(x1.first, x2.first) &&
@@ -362,7 +362,7 @@ namespace test {
{
UNORDERED_SCOPE(operator==(equal_to, equal_to))
{
UNORDERED_EPOINT("Mock equal_to equality function.");
UNORDERED_EPOINT("Mock equal_to equality function.")
}
return x1.tag_ == x2.tag_;
}
@@ -371,7 +371,7 @@ namespace test {
{
UNORDERED_SCOPE(operator!=(equal_to, equal_to))
{
UNORDERED_EPOINT("Mock equal_to inequality function.");
UNORDERED_EPOINT("Mock equal_to inequality function.")
}
return x1.tag_ != x2.tag_;
}
@@ -412,7 +412,7 @@ namespace test {
{
UNORDERED_SCOPE(allocator::allocator())
{
UNORDERED_EPOINT("Mock allocator default constructor.");
UNORDERED_EPOINT("Mock allocator default constructor.")
}
test::detail::tracker.allocator_ref();
}
@@ -460,7 +460,7 @@ namespace test {
T* ptr = 0;
UNORDERED_SCOPE(allocator::allocate(size_type))
{
UNORDERED_EPOINT("Mock allocator allocate function.");
UNORDERED_EPOINT("Mock allocator allocate function.")
using namespace std;
ptr = (T*)malloc(n * sizeof(T));
@@ -478,7 +478,7 @@ namespace test {
T* ptr = 0;
UNORDERED_SCOPE(allocator::allocate(size_type, const_pointer))
{
UNORDERED_EPOINT("Mock allocator allocate function.");
UNORDERED_EPOINT("Mock allocator allocate function.")
using namespace std;
ptr = (T*)malloc(n * sizeof(T));
@@ -507,7 +507,7 @@ namespace test {
{
UNORDERED_SCOPE(allocator::construct(U*, Arg))
{
UNORDERED_EPOINT("Mock allocator construct function.");
UNORDERED_EPOINT("Mock allocator construct function.")
new (p) U(t);
}
test::detail::tracker.track_construct((void*)p, sizeof(U), tag_);
@@ -517,7 +517,7 @@ namespace test {
{
UNORDERED_SCOPE(allocator::construct(U*, BOOST_FWD_REF(Args)...))
{
UNORDERED_EPOINT("Mock allocator construct function.");
UNORDERED_EPOINT("Mock allocator construct function.")
new (p) U(boost::forward<Args>(args)...);
}
test::detail::tracker.track_construct((void*)p, sizeof(U), tag_);
@@ -535,7 +535,7 @@ namespace test {
{
UNORDERED_SCOPE(allocator::construct(pointer, T))
{
UNORDERED_EPOINT("Mock allocator max_size function.");
UNORDERED_EPOINT("Mock allocator max_size function.")
}
return (std::numeric_limits<std::size_t>::max)();
}
@@ -592,7 +592,7 @@ namespace test {
{
UNORDERED_SCOPE(allocator2::allocator2())
{
UNORDERED_EPOINT("Mock allocator2 default constructor.");
UNORDERED_EPOINT("Mock allocator2 default constructor.")
}
test::detail::tracker.allocator_ref();
}
@@ -641,7 +641,7 @@ namespace test {
T* ptr = 0;
UNORDERED_SCOPE(allocator2::allocate(size_type))
{
UNORDERED_EPOINT("Mock allocator2 allocate function.");
UNORDERED_EPOINT("Mock allocator2 allocate function.")
using namespace std;
ptr = (T*)malloc(n * sizeof(T));
@@ -659,7 +659,7 @@ namespace test {
T* ptr = 0;
UNORDERED_SCOPE(allocator2::allocate(size_type, const_pointer))
{
UNORDERED_EPOINT("Mock allocator2 allocate function.");
UNORDERED_EPOINT("Mock allocator2 allocate function.")
using namespace std;
ptr = (T*)malloc(n * sizeof(T));
@@ -688,7 +688,7 @@ namespace test {
{
UNORDERED_SCOPE(allocator2::construct(U*, V))
{
UNORDERED_EPOINT("Mock allocator2 construct function.");
UNORDERED_EPOINT("Mock allocator2 construct function.")
new (p) U(v);
}
test::detail::tracker.track_construct((void*)p, sizeof(U), tag_);
@@ -699,7 +699,7 @@ namespace test {
{
UNORDERED_SCOPE(allocator2::construct(U*, BOOST_FWD_REF(Args)...))
{
UNORDERED_EPOINT("Mock allocator2 construct function.");
UNORDERED_EPOINT("Mock allocator2 construct function.")
new (p) U(boost::forward<Args>(args)...);
}
test::detail::tracker.track_construct((void*)p, sizeof(U), tag_);
@@ -717,7 +717,7 @@ namespace test {
{
UNORDERED_SCOPE(allocator2::construct(pointer, T))
{
UNORDERED_EPOINT("Mock allocator2 max_size function.");
UNORDERED_EPOINT("Mock allocator2 max_size function.")
}
return (std::numeric_limits<std::size_t>::max)();
}
+1 -1
View File
@@ -700,7 +700,7 @@ void unordered_test(X& x, Key& k, Hash& hf, Pred& eq)
const_iterator q1 = a.cbegin(), q2 = a.cend();
test::check_return_type<iterator>::equals(a.erase(q1, q2));
TEST_NOEXCEPT_EXPR(a.clear());
TEST_NOEXCEPT_EXPR(a.clear())
a.clear();
X const b;
+2 -2
View File
@@ -39,8 +39,8 @@ template <typename T> struct A
std::free(p);
}
bool operator==(A const& a) const { return i == a.i; };
bool operator!=(A const& a) const { return i != a.i; };
bool operator==(A const& a) const { return i == a.i; }
bool operator!=(A const& a) const { return i != a.i; }
};
template <class T> int A<T>::count = 0;
+4 -4
View File
@@ -1689,14 +1689,14 @@ template <class UnorderedMap> void test_map_transparent_at(UnorderedMap*)
map.at(0) = 7331;
BOOST_TEST_EQ(key::count_, key_count);
BOOST_TEST_THROWS(map.at(4), std::out_of_range);
BOOST_TEST_THROWS(map.at(4), std::out_of_range)
BOOST_TEST_EQ(key::count_, key_count);
UnorderedMap const& m = map;
BOOST_TEST_EQ(m.at(0), 7331);
BOOST_TEST_EQ(key::count_, key_count);
BOOST_TEST_THROWS(m.at(4), std::out_of_range);
BOOST_TEST_THROWS(m.at(4), std::out_of_range)
BOOST_TEST_EQ(key::count_, key_count);
}
@@ -1719,7 +1719,7 @@ template <class UnorderedMap> void test_map_non_transparent_at(UnorderedMap*)
BOOST_TEST_EQ(key::count_, key_count + 1);
key_count = key::count_;
BOOST_TEST_THROWS(map.at(4), std::out_of_range);
BOOST_TEST_THROWS(map.at(4), std::out_of_range)
BOOST_TEST_EQ(key::count_, key_count + 1);
key_count = key::count_;
@@ -1728,7 +1728,7 @@ template <class UnorderedMap> void test_map_non_transparent_at(UnorderedMap*)
BOOST_TEST_EQ(key::count_, key_count + 1);
key_count = key::count_;
BOOST_TEST_THROWS(m.at(4), std::out_of_range);
BOOST_TEST_THROWS(m.at(4), std::out_of_range)
BOOST_TEST_EQ(key::count_, key_count + 1);
}