aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-10-29 14:47:18 +0000
committerJonathan Wakely <jwakely@redhat.com>2020-10-29 14:47:18 +0000
commit8c84486bba104399b7e544cb1ba343646d39ea0a (patch)
treea5b7591746792a83e332fdd5f397e4692c7b8df1 /gcc
parent822c1d21a3c710831af65a6e3bc83f558fb39044 (diff)
downloadgcc-8c84486bba104399b7e544cb1ba343646d39ea0a.zip
gcc-8c84486bba104399b7e544cb1ba343646d39ea0a.tar.gz
gcc-8c84486bba104399b7e544cb1ba343646d39ea0a.tar.bz2
libstdc++: Improve tests for constexpr algorithms
These tests just return true without checking that the results of the algorithms. Although it should be safe to assume that the algorithms behave the same at compile-time as at run-time, we can use these tests to verify it. This replaces each 'return true' statement with a condition that depends on the basic functionality of the algorithm, such as returning an iterator to the right position. libstdc++-v3/ChangeLog: * testsuite/25_algorithms/all_of/constexpr.cc: Check result of the algorithm. * testsuite/25_algorithms/any_of/constexpr.cc: Likewise. * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise. * testsuite/25_algorithms/copy_backward/constexpr.cc: Likewise. * testsuite/25_algorithms/count/constexpr.cc: Likewise. * testsuite/25_algorithms/equal/constexpr.cc: Likewise. * testsuite/25_algorithms/equal_range/constexpr.cc: Likewise. * testsuite/25_algorithms/fill/constexpr.cc: Likewise. * testsuite/25_algorithms/find_end/constexpr.cc: Likewise. * testsuite/25_algorithms/find_if/constexpr.cc: Likewise. * testsuite/25_algorithms/is_partitioned/constexpr.cc: Likewise. * testsuite/25_algorithms/is_permutation/constexpr.cc: Likewise. * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Likewise. * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Likewise. * testsuite/25_algorithms/lower_bound/constexpr.cc: Likewise. * testsuite/25_algorithms/merge/constexpr.cc: Likewise. * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise. * testsuite/25_algorithms/none_of/constexpr.cc: Likewise. * testsuite/25_algorithms/partition_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/remove_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Likewise. * testsuite/25_algorithms/remove_if/constexpr.cc: Likewise. * testsuite/25_algorithms/replace_if/constexpr.cc: Likewise. * testsuite/25_algorithms/reverse/constexpr.cc: Likewise. * testsuite/25_algorithms/reverse_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/rotate_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/search/constexpr.cc: Likewise. * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise. * testsuite/25_algorithms/set_intersection/constexpr.cc: Likewise. * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Likewise. * testsuite/25_algorithms/set_union/constexpr.cc: Likewise. * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise. * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions