diff options
author | Stephan T. Lavavej <stl@nuwen.net> | 2023-11-26 17:11:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 02:11:24 +0100 |
commit | f5832bab6f5024cabe32a9f668b7f44e6b7cfef5 (patch) | |
tree | a6740bffc3a7b037de8b410f2e1c7e979c1596c9 /libcxx/test/std/algorithms/alg.modifying.operations | |
parent | af3c5a7cf1e008a467eb3104424ed122b533d7b3 (diff) | |
download | llvm-f5832bab6f5024cabe32a9f668b7f44e6b7cfef5.zip llvm-f5832bab6f5024cabe32a9f668b7f44e6b7cfef5.tar.gz llvm-f5832bab6f5024cabe32a9f668b7f44e6b7cfef5.tar.bz2 |
[libc++][test] Cleanup typos and unnecessary semicolons (#73435)
I've structured this into a series of commits for even easier reviewing,
if that helps. I could easily split this up into separate PRs if
desired, but as this is low-risk with simple edits, I thought one PR
would be easiest.
* Drop unnecessary semicolons after function definitions.
* Cleanup comment typos.
* Cleanup `static_assert` typos.
* Cleanup test code typos.
+ There should be no functional changes, assuming I've changed all
occurrences.
* ~~Fix massive test code typos.~~
+ This was a real problem, but needed more surgery. I reverted those
changes here, and @philnik777 is fixing this properly with #73444.
* clang-formatting as requested by the CI.
Diffstat (limited to 'libcxx/test/std/algorithms/alg.modifying.operations')
4 files changed, 22 insertions, 22 deletions
diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp index 3192599..96387b2 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp @@ -35,7 +35,7 @@ static_assert(!HasRemoveIt<PermutableNotForwardIterator>); static_assert(!HasRemoveIt<PermutableNotSwappable>); static_assert(!HasRemoveIt<int*, SentinelForNotSemiregular>); static_assert(!HasRemoveIt<int*, SentinelForNotWeaklyEqualityComparableWith>); -static_assert(!HasRemoveIt<int**>); // not indirect_binary_prediacte +static_assert(!HasRemoveIt<int**>); // not indirect_binary_predicate template <class Range> concept HasRemoveR = requires(Range range) { std::ranges::remove(range, 0); }; @@ -45,7 +45,7 @@ static_assert(!HasRemoveR<PermutableRangeNotForwardIterator>); static_assert(!HasRemoveR<PermutableRangeNotSwappable>); static_assert(!HasRemoveR<SentinelForNotSemiregular>); static_assert(!HasRemoveR<SentinelForNotWeaklyEqualityComparableWith>); -static_assert(!HasRemoveR<UncheckedRange<int**>>); // not indirect_binary_prediacte +static_assert(!HasRemoveR<UncheckedRange<int**>>); // not indirect_binary_predicate template <int N, int M> struct Data { diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp index 9420902..b604263 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp @@ -19,7 +19,7 @@ // ranges::transform(I1 first1, S1 last1, I2 first2, S2 last2, O result, // F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); -// The range overloads are tested in ranges.tranform.binary.range.pass.cpp. +// The range overloads are tested in ranges.transform.binary.range.pass.cpp. #include <algorithm> #include <array> diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp index bebe456..08ca8aa 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp @@ -18,7 +18,7 @@ // ranges::transform(R1&& r1, R2&& r2, O result, // F binary_op, Proj1 proj1 = {}, Proj2 proj2 = {}); -// The iterator overloads are tested in ranges.tranform.binary.iterator.pass.cpp. +// The iterator overloads are tested in ranges.transform.binary.iterator.pass.cpp. #include <algorithm> #include <array> @@ -34,15 +34,15 @@ struct BinaryFunc { }; template <class Range> -concept HasTranformR = requires(Range r, int* out) { std::ranges::transform(r, r, out, BinaryFunc{}); }; - -static_assert(HasTranformR<std::array<int, 1>>); -static_assert(!HasTranformR<int>); -static_assert(!HasTranformR<InputRangeNotDerivedFrom>); -static_assert(!HasTranformR<InputRangeNotIndirectlyReadable>); -static_assert(!HasTranformR<InputRangeNotInputOrOutputIterator>); -static_assert(!HasTranformR<InputRangeNotSentinelSemiregular>); -static_assert(!HasTranformR<InputRangeNotSentinelEqualityComparableWith>); +concept HasTransformR = requires(Range r, int* out) { std::ranges::transform(r, r, out, BinaryFunc{}); }; + +static_assert(HasTransformR<std::array<int, 1>>); +static_assert(!HasTransformR<int>); +static_assert(!HasTransformR<InputRangeNotDerivedFrom>); +static_assert(!HasTransformR<InputRangeNotIndirectlyReadable>); +static_assert(!HasTransformR<InputRangeNotInputOrOutputIterator>); +static_assert(!HasTransformR<InputRangeNotSentinelSemiregular>); +static_assert(!HasTransformR<InputRangeNotSentinelEqualityComparableWith>); template <class It> concept HasTransformOut = requires(int* it, int* sent, It out, std::array<int, 2> range) { diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.unary.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.unary.pass.cpp index b83f9cc..eeacf83 100644 --- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.unary.pass.cpp +++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.unary.pass.cpp @@ -31,15 +31,15 @@ #include "almost_satisfies_types.h" template <class Range> -concept HasTranformR = requires(Range r, int* out) { std::ranges::transform(r, out, std::identity{}); }; - -static_assert(HasTranformR<std::array<int, 1>>); -static_assert(!HasTranformR<int>); -static_assert(!HasTranformR<InputRangeNotDerivedFrom>); -static_assert(!HasTranformR<InputRangeNotIndirectlyReadable>); -static_assert(!HasTranformR<InputRangeNotInputOrOutputIterator>); -static_assert(!HasTranformR<InputRangeNotSentinelSemiregular>); -static_assert(!HasTranformR<InputRangeNotSentinelEqualityComparableWith>); +concept HasTransformR = requires(Range r, int* out) { std::ranges::transform(r, out, std::identity{}); }; + +static_assert(HasTransformR<std::array<int, 1>>); +static_assert(!HasTransformR<int>); +static_assert(!HasTransformR<InputRangeNotDerivedFrom>); +static_assert(!HasTransformR<InputRangeNotIndirectlyReadable>); +static_assert(!HasTransformR<InputRangeNotInputOrOutputIterator>); +static_assert(!HasTransformR<InputRangeNotSentinelSemiregular>); +static_assert(!HasTransformR<InputRangeNotSentinelEqualityComparableWith>); template <class It, class Sent = It> concept HasTransformIt = |