forked from OSchip/llvm-project
parent
c45b673d5d
commit
3e572598d3
libcxx/test/std/containers/sequences/forwardlist
|
@ -15,6 +15,7 @@
|
|||
#include <cassert>
|
||||
#include <iterator>
|
||||
|
||||
#include "test_macros.h"
|
||||
#include "min_allocator.h"
|
||||
|
||||
typedef int T;
|
||||
|
@ -44,7 +45,6 @@ tests(const C& c, int p, int f)
|
|||
{
|
||||
typename C::const_iterator i = c.begin();
|
||||
int n = 0;
|
||||
int d = 1;
|
||||
if (p == f || p == f+1)
|
||||
{
|
||||
for (n = 0; n < size_t1; ++n, ++i)
|
||||
|
@ -106,7 +106,7 @@ int main()
|
|||
}
|
||||
}
|
||||
}
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
{
|
||||
// splicing different containers
|
||||
typedef std::forward_list<T, min_allocator<T>> C;
|
||||
|
|
|
@ -22,12 +22,12 @@
|
|||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
#include "min_allocator.h"
|
||||
|
||||
template <class C>
|
||||
void test(int N, int M)
|
||||
{
|
||||
typedef typename C::value_type T;
|
||||
C c1;
|
||||
for (int i = 0; i < N; ++i)
|
||||
c1.push_front(i);
|
||||
|
@ -52,7 +52,7 @@ int main()
|
|||
for (int i = 0; i < 10; ++i)
|
||||
for (int j = 0; j < 10; ++j)
|
||||
test<std::forward_list<int> >(i, j);
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
for (int i = 0; i < 10; ++i)
|
||||
for (int j = 0; j < 10; ++j)
|
||||
test<std::forward_list<int, min_allocator<int>> >(i, j);
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
#include <algorithm>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
#include "min_allocator.h"
|
||||
|
||||
template <class C>
|
||||
void test(int N, int M)
|
||||
{
|
||||
typedef typename C::value_type T;
|
||||
C c1;
|
||||
for (int i = 0; i < N; ++i)
|
||||
c1.push_front(i);
|
||||
|
@ -57,7 +57,7 @@ int main()
|
|||
for (int i = 0; i < 10; ++i)
|
||||
for (int j = 0; j < 10; ++j)
|
||||
test<std::forward_list<int> >(i, j);
|
||||
#if __cplusplus >= 201103L
|
||||
#if TEST_STD_VER >= 11
|
||||
for (int i = 0; i < 10; ++i)
|
||||
for (int j = 0; j < 10; ++j)
|
||||
test<std::forward_list<int, min_allocator<int>> >(i, j);
|
||||
|
|
Loading…
Reference in New Issue