i->second = 2.5;
assert(i->second == 2.5);
}
+ assert(i == m.end());
+ for (int j = m.size(); j >= 1; --j)
+ {
+ --i;
+ assert(i->first == j);
+ assert(i->second == 2.5);
+ i->second = 1;
+ assert(i->second == 1);
+ }
+ assert(i == m.begin());
}
{
typedef std::pair<const int, double> V;
assert(i->first == j);
assert(i->second == 1);
}
+ assert(i == m.end());
+ for (int j = m.size(); j >= 1; --j)
+ {
+ --i;
+ assert(i->first == j);
+ assert(i->second == 1);
+ }
+ assert(i == m.begin());
}
#if TEST_STD_VER >= 11
{
i->second = 2.5;
assert(i->second == 2.5);
}
+ assert(i == m.end());
+ for (int j = m.size(); j >= 1; --j)
+ {
+ --i;
+ assert(i->first == j);
+ assert(i->second == 2.5);
+ i->second = 1;
+ assert(i->second == 1);
+ }
+ assert(i == m.begin());
}
{
typedef std::pair<const int, double> V;
assert(i->first == j);
assert(i->second == 1);
}
+ assert(i == m.end());
+ for (int j = m.size(); j >= 1; --j)
+ {
+ --i;
+ assert(i->first == j);
+ assert(i->second == 1);
+ }
+ assert(i == m.begin());
}
#endif
#if TEST_STD_VER > 11
i->second = 2.5;
assert(i->second == 2.5);
}
+ assert(i == m.end());
+ for (int j = 8; j >= 1; --j)
+ for (double d = 1; d <= 2; d += .5)
+ {
+ --i;
+ assert(i->first == j);
+ assert(i->second == 2.5);
+ i->second = d;
+ assert(i->second == d);
+ }
+ assert(i == m.begin());
}
{
typedef std::pair<const int, double> V;
assert(i->first == j);
assert(i->second == d);
}
+ assert(i == m.end());
+ for (int j = 8; j >= 1; --j)
+ for (double d = 2; d >= 1; d -= .5)
+ {
+ --i;
+ assert(i->first == j);
+ assert(i->second == d);
+ }
+ assert(i == m.begin());
}
#if TEST_STD_VER >= 11
{
i->second = 2.5;
assert(i->second == 2.5);
}
+ assert(i == m.end());
+ for (int j = 8; j >= 1; --j)
+ for (double d = 1; d <= 2; d += .5)
+ {
+ --i;
+ assert(i->first == j);
+ assert(i->second == 2.5);
+ i->second = d;
+ assert(i->second == d);
+ }
+ assert(i == m.begin());
}
{
typedef std::pair<const int, double> V;
assert(i->first == j);
assert(i->second == d);
}
+ assert(i == m.end());
+ for (int j = 8; j >= 1; --j)
+ for (double d = 2; d >= 1; d -= .5)
+ {
+ --i;
+ assert(i->first == j);
+ assert(i->second == d);
+ }
+ assert(i == m.begin());
}
#endif
#if TEST_STD_VER > 11
for (int j = 1; j <= 8; ++j)
for (int n = 0; n < 3; ++n, ++i)
assert(*i == j);
+ assert(i == m.end());
+ for (int j = 8; j >= 1; --j)
+ for (int n = 0; n < 3; ++n) {
+ --i;
+ assert(*i == j);
+ }
+ assert(i == m.begin());
}
{
typedef int V;
for (int j = 1; j <= 8; ++j)
for (int k = 0; k < 3; ++k, ++i)
assert(*i == j);
+ assert(i == m.end());
+ for (int j = 8; j >= 1; --j)
+ for (int k = 0; k < 3; ++k) {
+ --i;
+ assert(*i == j);
+ }
+ assert(i == m.begin());
}
#if TEST_STD_VER >= 11
{
for (int j = 1; j <= 8; ++j)
for (int n = 0; n < 3; ++n, ++i)
assert(*i == j);
+ assert(i == m.end());
+ for (int j = 8; j >= 1; --j)
+ for (int n = 0; n < 3; ++n) {
+ --i;
+ assert(*i == j);
+ }
+ assert(i == m.begin());
}
{
typedef int V;
for (int j = 1; j <= 8; ++j)
for (int k = 0; k < 3; ++k, ++i)
assert(*i == j);
+ assert(i == m.end());
+ for (int j = 8; j >= 1; --j)
+ for (int k = 0; k < 3; ++k) {
+ --i;
+ assert(*i == j);
+ }
+ assert(i == m.begin());
}
#endif
#if TEST_STD_VER > 11
assert(i == k);
for (int j = 1; static_cast<std::size_t>(j) <= m.size(); ++j, ++i)
assert(*i == j);
+ assert(i == m.end());
+ for (int j = m.size(); j >= 1; --j) {
+ --i;
+ assert(*i == j);
+ }
+ assert(i == m.begin());
}
{
typedef int V;
i = m.begin();
for (int j = 1; static_cast<std::size_t>(j) <= m.size(); ++j, ++i)
assert(*i == j);
+ assert(i == m.end());
+ for (int j = m.size(); j >= 1; --j) {
+ --i;
+ assert(*i == j);
+ }
+ assert(i == m.begin());
}
#if TEST_STD_VER >= 11
{
assert(i == k);
for (int j = 1; static_cast<std::size_t>(j) <= m.size(); ++j, ++i)
assert(*i == j);
+ assert(i == m.end());
+ for (int j = m.size(); j >= 1; --j) {
+ --i;
+ assert(*i == j);
+ }
+ assert(i == m.begin());
}
{
typedef int V;
i = m.begin();
for (int j = 1; static_cast<std::size_t>(j) <= m.size(); ++j, ++i)
assert(*i == j);
+ assert(i == m.end());
+ for (int j = m.size(); j >= 1; --j) {
+ --i;
+ assert(*i == j);
+ }
+ assert(i == m.begin());
}
#endif
#if TEST_STD_VER > 11