[libcxx] r322505 - Some of the tests from earlier today had 'int' as the return type when it should have been 'bool'. Fix that. It doesn't change the behavior of any of the tests, but it's more accurate.
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 15 11:32:32 PST 2018
Author: marshall
Date: Mon Jan 15 11:32:32 2018
New Revision: 322505
URL: http://llvm.org/viewvc/llvm-project?rev=322505&view=rev
Log:
Some of the tests from earlier today had 'int' as the return type when it should have been 'bool'. Fix that. It doesn't change the behavior of any of the tests, but it's more accurate.
Modified:
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp
libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_point.pass.cpp
libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.all_of/all_of.pass.cpp
libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.any_of/any_of.pass.cpp
libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation.pass.cpp
libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation_pred.pass.cpp
libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.none_of/none_of.pass.cpp
libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap.pass.cpp
libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_comp.pass.cpp
libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until.pass.cpp
libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until_comp.pass.cpp
libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted.pass.cpp
libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_comp.pass.cpp
libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until.pass.cpp
libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until_comp.pass.cpp
Modified: libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp Mon Jan 15 11:32:32 2018
@@ -27,7 +27,7 @@ struct is_odd {
};
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {1, 3, 5, 2, 4, 6};
int ib[] = {1, 2, 3, 4, 5, 6};
return std::is_partitioned(std::begin(ia), std::end(ia), is_odd())
Modified: libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_point.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_point.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_point.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_point.pass.cpp Mon Jan 15 11:32:32 2018
@@ -26,7 +26,7 @@ struct is_odd
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {1, 3, 5, 2, 4, 6};
int ib[] = {1, 2, 3, 4, 5, 6};
return (std::partition_point(std::begin(ia), std::end(ia), is_odd()) == ia+3)
Modified: libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.all_of/all_of.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.all_of/all_of.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.all_of/all_of.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.all_of/all_of.pass.cpp Mon Jan 15 11:32:32 2018
@@ -28,7 +28,7 @@ struct test1
};
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {2, 4, 6, 8};
int ib[] = {2, 4, 5, 8};
return std::all_of(std::begin(ia), std::end(ia), test1())
Modified: libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.any_of/any_of.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.any_of/any_of.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.any_of/any_of.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.any_of/any_of.pass.cpp Mon Jan 15 11:32:32 2018
@@ -28,7 +28,7 @@ struct test1
};
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {2, 4, 6, 8};
int ib[] = {1, 3, 5, 7};
return std::any_of(std::begin(ia), std::end(ia), test1())
Modified: libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation.pass.cpp Mon Jan 15 11:32:32 2018
@@ -22,7 +22,7 @@
#include "test_macros.h"
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {0, 0, 0};
int ib[] = {1, 1, 0};
int ic[] = {1, 0, 1};
Modified: libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation_pred.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation_pred.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation_pred.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.is_permutation/is_permutation_pred.pass.cpp Mon Jan 15 11:32:32 2018
@@ -29,7 +29,7 @@ bool counting_equals ( const T &a, const
}
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {0, 0, 0};
int ib[] = {1, 1, 0};
int ic[] = {1, 0, 1};
Modified: libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.none_of/none_of.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.none_of/none_of.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.none_of/none_of.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.nonmodifying/alg.none_of/none_of.pass.cpp Mon Jan 15 11:32:32 2018
@@ -28,7 +28,7 @@ struct test1
};
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {1, 3, 6, 7};
int ib[] = {1, 3, 5, 7};
return !std::none_of(std::begin(ia), std::end(ia), test1())
Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap.pass.cpp Mon Jan 15 11:32:32 2018
@@ -20,7 +20,7 @@
#include "test_macros.h"
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {1, 1, 1, 1, 0, 1, 1};
int ib[] = {0, 0, 1, 0, 0, 0, 0};
return std::is_heap(std::begin(ia), std::end(ia))
Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_comp.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_comp.pass.cpp Mon Jan 15 11:32:32 2018
@@ -21,7 +21,7 @@
#include "test_macros.h"
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {0, 0, 1, 1, 1};
int ib[] = {1, 0, 4, 1, 0};
return std::is_heap(std::begin(ia), std::end(ia), std::greater<int>())
Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until.pass.cpp Mon Jan 15 11:32:32 2018
@@ -20,7 +20,7 @@
#include "test_macros.h"
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {0, 0, 0, 0, 1, 0};
int ib[] = {0, 0, 0, 1, 1, 1};
return (std::is_heap_until(std::begin(ia), std::end(ia)) == ia+4)
Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until_comp.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/is_heap_until_comp.pass.cpp Mon Jan 15 11:32:32 2018
@@ -21,7 +21,7 @@
#include "test_macros.h"
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {1, 0, 0, 0};
int ib[] = {0, 1, 1, 0};
return (std::is_heap_until(std::begin(ia), std::end(ia), std::greater<int>()) == ia+1)
Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted.pass.cpp Mon Jan 15 11:32:32 2018
@@ -20,7 +20,7 @@
#include "test_iterators.h"
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {0, 0, 1, 1};
int ib[] = {1, 1, 0, 0};
return std::is_sorted(std::begin(ia), std::end(ia))
Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_comp.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_comp.pass.cpp Mon Jan 15 11:32:32 2018
@@ -21,7 +21,7 @@
#include "test_iterators.h"
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {1, 1, 0, 0};
int ib[] = {0, 0, 1, 1};
return std::is_sorted(std::begin(ia), std::end(ia), std::greater<int>())
Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until.pass.cpp Mon Jan 15 11:32:32 2018
@@ -20,7 +20,7 @@
#include "test_iterators.h"
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {0, 1, 0};
int ib[] = {0, 1, 1};
return (std::is_sorted_until(std::begin(ia), std::end(ia)) == ia+2)
Modified: libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until_comp.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until_comp.pass.cpp?rev=322505&r1=322504&r2=322505&view=diff
==============================================================================
--- libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until_comp.pass.cpp (original)
+++ libcxx/trunk/test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_until_comp.pass.cpp Mon Jan 15 11:32:32 2018
@@ -21,7 +21,7 @@
#include "test_iterators.h"
#if TEST_STD_VER > 17
-TEST_CONSTEXPR int test_constexpr() {
+TEST_CONSTEXPR bool test_constexpr() {
int ia[] = {1, 0, 1};
int ib[] = {1, 1, 0};
return (std::is_sorted_until(std::begin(ia), std::end(ia), std::greater<int>()) == ia+2)
More information about the cfe-commits
mailing list