summaryrefslogtreecommitdiffstats
path: root/libcxx/test/algorithms/alg.sorting
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2010-09-04 23:28:19 +0000
committerHoward Hinnant <hhinnant@apple.com>2010-09-04 23:28:19 +0000
commit7609c9b665d67c9738fdd0af53ba9e8782218542 (patch)
tree79269b65cc775b7f08160aca8f688ba04e0bfe86 /libcxx/test/algorithms/alg.sorting
parentedbdff64c720d143b5ae7ace2733256b51be8bb9 (diff)
downloadbcm5719-llvm-7609c9b665d67c9738fdd0af53ba9e8782218542.tar.gz
bcm5719-llvm-7609c9b665d67c9738fdd0af53ba9e8782218542.zip
Changed __config to react to all of clang's currently documented has_feature flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature.
llvm-svn: 113086
Diffstat (limited to 'libcxx/test/algorithms/alg.sorting')
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp8
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp8
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp8
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp8
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp8
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp4
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp4
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp4
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp4
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp4
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp4
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp8
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp8
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp8
-rw-r--r--libcxx/test/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp8
15 files changed, 48 insertions, 48 deletions
diff --git a/libcxx/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
index 70b1b81549e..1b9d6c0ab5c 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.heap.operations/make.heap/make_heap_comp.pass.cpp
@@ -17,7 +17,7 @@
#include <algorithm>
#include <functional>
#include <cassert>
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
struct indirect_less
@@ -27,7 +27,7 @@ struct indirect_less
{return *x < *y;}
};
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
void test(unsigned N)
{
@@ -49,7 +49,7 @@ int main()
test(10);
test(1000);
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
const int N = 1000;
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
@@ -60,5 +60,5 @@ int main()
assert(std::is_heap(ia, ia+N, indirect_less()));
delete [] ia;
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp
index cc093a54083..aeae64f25f4 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.heap.operations/pop.heap/pop_heap_comp.pass.cpp
@@ -17,7 +17,7 @@
#include <algorithm>
#include <functional>
#include <cassert>
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
struct indirect_less
@@ -27,7 +27,7 @@ struct indirect_less
{return *x < *y;}
};
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
void test(unsigned N)
{
@@ -49,7 +49,7 @@ int main()
{
test(1000);
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
const int N = 1000;
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
@@ -64,5 +64,5 @@ int main()
}
delete [] ia;
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp
index 87126298bf9..132fc600953 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.heap.operations/push.heap/push_heap_comp.pass.cpp
@@ -18,7 +18,7 @@
#include <algorithm>
#include <functional>
#include <cassert>
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
struct indirect_less
@@ -28,7 +28,7 @@ struct indirect_less
{return *x < *y;}
};
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
void test(unsigned N)
{
@@ -48,7 +48,7 @@ int main()
{
test(1000);
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
const int N = 1000;
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
@@ -62,5 +62,5 @@ int main()
}
delete [] ia;
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp
index 8cac3b6cdc7..e451e68b72d 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.heap.operations/sort.heap/sort_heap_comp.pass.cpp
@@ -17,7 +17,7 @@
#include <algorithm>
#include <functional>
#include <cassert>
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
struct indirect_less
@@ -27,7 +27,7 @@ struct indirect_less
{return *x < *y;}
};
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
void test(unsigned N)
{
@@ -50,7 +50,7 @@ int main()
test(10);
test(1000);
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
const int N = 1000;
std::unique_ptr<int>* ia = new std::unique_ptr<int> [N];
@@ -62,5 +62,5 @@ int main()
assert(std::is_sorted(ia, ia+N, indirect_less()));
delete [] ia;
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
index 56f46287bc6..1ee72885e38 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
@@ -18,7 +18,7 @@
#include <algorithm>
#include <functional>
#include <cassert>
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
struct indirect_less
@@ -28,7 +28,7 @@ struct indirect_less
{return *x < *y;}
};
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include "../../iterators.h"
@@ -89,7 +89,7 @@ int main()
test<random_access_iterator<int*> >();
test<int*>();
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
unsigned N = 100;
unsigned M = 50;
@@ -108,5 +108,5 @@ int main()
}
delete [] ia;
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp
index d79ddde58b5..9d274357c18 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list.pass.cpp
@@ -18,7 +18,7 @@
int main()
{
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
int i = std::max({2, 3, 1});
assert(i == 3);
i = std::max({2, 1, 3});
@@ -31,5 +31,5 @@ int main()
assert(i == 3);
i = std::max({1, 3, 2});
assert(i == 3);
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp
index c31a9f8dcc7..e15a107cafa 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.min.max/max_init_list_comp.pass.cpp
@@ -19,7 +19,7 @@
int main()
{
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
int i = std::max({2, 3, 1}, std::greater<int>());
assert(i == 1);
i = std::max({2, 1, 3}, std::greater<int>());
@@ -32,5 +32,5 @@ int main()
assert(i == 1);
i = std::max({1, 3, 2}, std::greater<int>());
assert(i == 1);
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp
index 62c42064e7d..e281ba11c92 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list.pass.cpp
@@ -18,7 +18,7 @@
int main()
{
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
int i = std::min({2, 3, 1});
assert(i == 1);
i = std::min({2, 1, 3});
@@ -31,5 +31,5 @@ int main()
assert(i == 1);
i = std::min({1, 3, 2});
assert(i == 1);
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp
index 2b9499ba8c0..729b4f5f9e0 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.min.max/min_init_list_comp.pass.cpp
@@ -19,7 +19,7 @@
int main()
{
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
int i = std::min({2, 3, 1}, std::greater<int>());
assert(i == 3);
i = std::min({2, 1, 3}, std::greater<int>());
@@ -32,5 +32,5 @@ int main()
assert(i == 3);
i = std::min({1, 3, 2}, std::greater<int>());
assert(i == 3);
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp
index cf028de1fe5..6d776a0f9c0 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list.pass.cpp
@@ -18,12 +18,12 @@
int main()
{
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
assert((std::minmax({1, 2, 3}) == std::pair<int, int>(1, 3)));
assert((std::minmax({1, 3, 2}) == std::pair<int, int>(1, 3)));
assert((std::minmax({2, 1, 3}) == std::pair<int, int>(1, 3)));
assert((std::minmax({2, 3, 1}) == std::pair<int, int>(1, 3)));
assert((std::minmax({3, 1, 2}) == std::pair<int, int>(1, 3)));
assert((std::minmax({3, 2, 1}) == std::pair<int, int>(1, 3)));
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
index d233c25258b..606a97042ef 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.min.max/minmax_init_list_comp.pass.cpp
@@ -19,12 +19,12 @@
int main()
{
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
assert((std::minmax({1, 2, 3}, std::greater<int>()) == std::pair<int, int>(3, 1)));
assert((std::minmax({1, 3, 2}, std::greater<int>()) == std::pair<int, int>(3, 1)));
assert((std::minmax({2, 1, 3}, std::greater<int>()) == std::pair<int, int>(3, 1)));
assert((std::minmax({2, 3, 1}, std::greater<int>()) == std::pair<int, int>(3, 1)));
assert((std::minmax({3, 1, 2}, std::greater<int>()) == std::pair<int, int>(3, 1)));
assert((std::minmax({3, 2, 1}, std::greater<int>()) == std::pair<int, int>(3, 1)));
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp
index 5e89a03fe15..dd31b4578df 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.nth.element/nth_element_comp.pass.cpp
@@ -19,7 +19,7 @@
#include <functional>
#include <vector>
#include <cassert>
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
struct indirect_less
@@ -29,7 +29,7 @@ struct indirect_less
{return *x < *y;}
};
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
void
test_one(unsigned N, unsigned M)
@@ -73,7 +73,7 @@ int main()
test(1000);
test(1009);
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::vector<std::unique_ptr<int> > v(1000);
for (int i = 0; i < v.size(); ++i)
@@ -81,5 +81,5 @@ int main()
std::nth_element(v.begin(), v.begin() + v.size()/2, v.end(), indirect_less());
assert(*v[v.size()/2] == v.size()/2);
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp
index d9e8e5f9699..433bc6631c1 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.sort/partial.sort/partial_sort_comp.pass.cpp
@@ -19,7 +19,7 @@
#include <vector>
#include <functional>
#include <cassert>
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
struct indirect_less
@@ -29,7 +29,7 @@ struct indirect_less
{return *x < *y;}
};
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
void
test_larger_sorts(unsigned N, unsigned M)
@@ -74,7 +74,7 @@ int main()
test_larger_sorts(1000);
test_larger_sorts(1009);
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::vector<std::unique_ptr<int> > v(1000);
for (int i = 0; i < v.size(); ++i)
@@ -83,5 +83,5 @@ int main()
for (int i = 0; i < v.size()/2; ++i)
assert(*v[i] == i);
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp
index 46f1abbbdc1..02349fe718e 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.sort/sort/sort_comp.pass.cpp
@@ -19,7 +19,7 @@
#include <functional>
#include <vector>
#include <cassert>
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
struct indirect_less
@@ -29,7 +29,7 @@ struct indirect_less
{return *x < *y;}
};
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
int main()
{
@@ -42,7 +42,7 @@ int main()
assert(std::is_sorted(v.begin(), v.end()));
}
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::vector<std::unique_ptr<int> > v(1000);
for (int i = 0; i < v.size(); ++i)
@@ -53,5 +53,5 @@ int main()
assert(*v[1] == 1);
assert(*v[2] == 2);
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
diff --git a/libcxx/test/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp b/libcxx/test/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp
index 6b57c2d4b90..3c439741d15 100644
--- a/libcxx/test/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp
+++ b/libcxx/test/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort_comp.pass.cpp
@@ -19,7 +19,7 @@
#include <functional>
#include <vector>
#include <cassert>
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
#include <memory>
struct indirect_less
@@ -29,7 +29,7 @@ struct indirect_less
{return *x < *y;}
};
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
struct first_only
{
@@ -68,7 +68,7 @@ int main()
{
test();
-#ifdef _LIBCPP_MOVE
+#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::vector<std::unique_ptr<int> > v(1000);
for (int i = 0; i < v.size(); ++i)
@@ -79,5 +79,5 @@ int main()
assert(*v[1] == 1);
assert(*v[2] == 2);
}
-#endif // _LIBCPP_MOVE
+#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}
OpenPOWER on IntegriCloud