summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample')
-rw-r--r--libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp4
-rw-r--r--libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp4
-rw-r--r--libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.stable.pass.cpp4
3 files changed, 9 insertions, 3 deletions
diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
index a9aa64e4812..c01104c0cfb 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.fail.cpp
@@ -32,9 +32,11 @@ template <class PopulationIterator, class SampleIterator> void test() {
SampleIterator(oa), os, g);
}
-int main() {
+int main(int, char**) {
// expected-error-re@algorithm:* {{static_assert failed{{( due to requirement '.*')?}} "SampleIterator must meet the requirements of RandomAccessIterator"}}
// expected-error@algorithm:* 2 {{does not provide a subscript operator}}
// expected-error@algorithm:* {{invalid operands}}
test<input_iterator<int *>, output_iterator<int *> >();
+
+ return 0;
}
diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp
index bfc71e779fa..40f2037f00e 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp
@@ -136,7 +136,7 @@ void test_small_population() {
}
}
-int main() {
+int main(int, char**) {
test<input_iterator, int, random_access_iterator, int>();
test<forward_iterator, int, output_iterator, int>();
test<forward_iterator, int, random_access_iterator, int>();
@@ -156,4 +156,6 @@ int main() {
test_small_population<input_iterator, int, random_access_iterator, int>();
test_small_population<forward_iterator, int, output_iterator, int>();
test_small_population<forward_iterator, int, random_access_iterator, int>();
+
+ return 0;
}
diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.stable.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.stable.pass.cpp
index aa7c74788d7..58e6084626a 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.stable.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.stable.pass.cpp
@@ -48,7 +48,9 @@ void test_stability(bool expect_stable) {
assert(expect_stable == !unstable);
}
-int main() {
+int main(int, char**) {
test_stability<forward_iterator<int *>, output_iterator<int *> >(true);
test_stability<input_iterator<int *>, random_access_iterator<int *> >(false);
+
+ return 0;
}
OpenPOWER on IntegriCloud