Fix sign-compare warning in test; Oddly this only appears on OS X
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@296851 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// UNSUPPORTED: c++98, c++03
|
||||
|
||||
// <forward_list>
|
||||
|
||||
// forward_list(forward_list&& x, const allocator_type& a);
|
||||
@@ -21,7 +23,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
{
|
||||
typedef MoveOnly T;
|
||||
typedef test_allocator<T> A;
|
||||
@@ -33,7 +34,7 @@ int main()
|
||||
unsigned n = 0;
|
||||
for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n)
|
||||
assert(*i == n);
|
||||
assert(n == std::end(t) - std::begin(t));
|
||||
assert(n == static_cast<unsigned>(std::end(t) - std::begin(t)));
|
||||
assert(c0.empty());
|
||||
assert(c.get_allocator() == A(10));
|
||||
}
|
||||
@@ -48,11 +49,10 @@ int main()
|
||||
unsigned n = 0;
|
||||
for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n)
|
||||
assert(*i == n);
|
||||
assert(n == std::end(t) - std::begin(t));
|
||||
assert(n == static_cast<unsigned>(std::end(t) - std::begin(t)));
|
||||
assert(!c0.empty());
|
||||
assert(c.get_allocator() == A(9));
|
||||
}
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
typedef MoveOnly T;
|
||||
typedef min_allocator<T> A;
|
||||
@@ -64,10 +64,8 @@ int main()
|
||||
unsigned n = 0;
|
||||
for (C::const_iterator i = c.begin(), e = c.end(); i != e; ++i, ++n)
|
||||
assert(*i == n);
|
||||
assert(n == std::end(t) - std::begin(t));
|
||||
assert(n == static_cast<unsigned>(std::end(t) - std::begin(t)));
|
||||
assert(c0.empty());
|
||||
assert(c.get_allocator() == A());
|
||||
}
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user