Skip to content

Commit c0f4685

Browse files
Cleanup test code typos.
1 parent a336fa4 commit c0f4685

File tree

20 files changed

+87
-87
lines changed

20 files changed

+87
-87
lines changed

libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ struct BinaryFunc {
3434
};
3535

3636
template <class Range>
37-
concept HasTranformR = requires(Range r, int* out) { std::ranges::transform(r, r, out, BinaryFunc{}); };
38-
39-
static_assert(HasTranformR<std::array<int, 1>>);
40-
static_assert(!HasTranformR<int>);
41-
static_assert(!HasTranformR<InputRangeNotDerivedFrom>);
42-
static_assert(!HasTranformR<InputRangeNotIndirectlyReadable>);
43-
static_assert(!HasTranformR<InputRangeNotInputOrOutputIterator>);
44-
static_assert(!HasTranformR<InputRangeNotSentinelSemiregular>);
45-
static_assert(!HasTranformR<InputRangeNotSentinelEqualityComparableWith>);
37+
concept HasTransformR = requires(Range r, int* out) { std::ranges::transform(r, r, out, BinaryFunc{}); };
38+
39+
static_assert(HasTransformR<std::array<int, 1>>);
40+
static_assert(!HasTransformR<int>);
41+
static_assert(!HasTransformR<InputRangeNotDerivedFrom>);
42+
static_assert(!HasTransformR<InputRangeNotIndirectlyReadable>);
43+
static_assert(!HasTransformR<InputRangeNotInputOrOutputIterator>);
44+
static_assert(!HasTransformR<InputRangeNotSentinelSemiregular>);
45+
static_assert(!HasTransformR<InputRangeNotSentinelEqualityComparableWith>);
4646

4747
template <class It>
4848
concept HasTransformOut = requires(int* it, int* sent, It out, std::array<int, 2> range) {

libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.unary.pass.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
#include "almost_satisfies_types.h"
3232

3333
template <class Range>
34-
concept HasTranformR = requires(Range r, int* out) { std::ranges::transform(r, out, std::identity{}); };
35-
36-
static_assert(HasTranformR<std::array<int, 1>>);
37-
static_assert(!HasTranformR<int>);
38-
static_assert(!HasTranformR<InputRangeNotDerivedFrom>);
39-
static_assert(!HasTranformR<InputRangeNotIndirectlyReadable>);
40-
static_assert(!HasTranformR<InputRangeNotInputOrOutputIterator>);
41-
static_assert(!HasTranformR<InputRangeNotSentinelSemiregular>);
42-
static_assert(!HasTranformR<InputRangeNotSentinelEqualityComparableWith>);
34+
concept HasTransformR = requires(Range r, int* out) { std::ranges::transform(r, out, std::identity{}); };
35+
36+
static_assert(HasTransformR<std::array<int, 1>>);
37+
static_assert(!HasTransformR<int>);
38+
static_assert(!HasTransformR<InputRangeNotDerivedFrom>);
39+
static_assert(!HasTransformR<InputRangeNotIndirectlyReadable>);
40+
static_assert(!HasTransformR<InputRangeNotInputOrOutputIterator>);
41+
static_assert(!HasTransformR<InputRangeNotSentinelSemiregular>);
42+
static_assert(!HasTransformR<InputRangeNotSentinelEqualityComparableWith>);
4343

4444
template <class It, class Sent = It>
4545
concept HasTransformIt =

libcxx/test/std/containers/sequences/deque/deque.modifiers/push_back_exception_safety.pass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <cassert>
1818

1919
// Flag that makes the copy constructor for CMyClass throw an exception
20-
static bool gCopyConstructorShouldThow = false;
20+
static bool gCopyConstructorShouldThrow = false;
2121

2222
class CMyClass {
2323
public: CMyClass(int tag);
@@ -51,7 +51,7 @@ CMyClass::CMyClass(const CMyClass& iOther) :
5151
fMagicValue(kStartedConstructionMagicValue), fTag(iOther.fTag)
5252
{
5353
// If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
54-
if (gCopyConstructorShouldThow) {
54+
if (gCopyConstructorShouldThrow) {
5555
throw std::exception();
5656
}
5757
// Signal that the constructor has finished running
@@ -74,13 +74,13 @@ int main(int, char**)
7474
vec.push_back(instance);
7575
std::deque<CMyClass> vec2(vec);
7676

77-
gCopyConstructorShouldThow = true;
77+
gCopyConstructorShouldThrow = true;
7878
try {
7979
vec.push_back(instance);
8080
assert(false);
8181
}
8282
catch (...) {
83-
gCopyConstructorShouldThow = false;
83+
gCopyConstructorShouldThrow = false;
8484
assert(vec==vec2);
8585
}
8686
}

libcxx/test/std/containers/sequences/deque/deque.modifiers/push_front_exception_safety.pass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "test_allocator.h"
1818

1919
// Flag that makes the copy constructor for CMyClass throw an exception
20-
static bool gCopyConstructorShouldThow = false;
20+
static bool gCopyConstructorShouldThrow = false;
2121

2222

2323
class CMyClass {
@@ -51,7 +51,7 @@ CMyClass::CMyClass(const CMyClass& iOther) :
5151
fMagicValue(kStartedConstructionMagicValue), fTag(iOther.fTag)
5252
{
5353
// If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
54-
if (gCopyConstructorShouldThow) {
54+
if (gCopyConstructorShouldThrow) {
5555
throw std::exception();
5656
}
5757
// Signal that the constructor has finished running
@@ -74,13 +74,13 @@ int main(int, char**)
7474
vec.push_front(instance);
7575
std::deque<CMyClass> vec2(vec);
7676

77-
gCopyConstructorShouldThow = true;
77+
gCopyConstructorShouldThrow = true;
7878
try {
7979
vec.push_front(instance);
8080
assert(false);
8181
}
8282
catch (...) {
83-
gCopyConstructorShouldThow = false;
83+
gCopyConstructorShouldThrow = false;
8484
assert(vec==vec2);
8585
}
8686
}

libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/push_front_exception_safety.pass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "test_macros.h"
1919

2020
// Flag that makes the copy constructor for CMyClass throw an exception
21-
static bool gCopyConstructorShouldThow = false;
21+
static bool gCopyConstructorShouldThrow = false;
2222

2323

2424
class CMyClass {
@@ -48,7 +48,7 @@ CMyClass::CMyClass(const CMyClass& /*iOther*/) :
4848
fMagicValue(kStartedConstructionMagicValue)
4949
{
5050
// If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
51-
if (gCopyConstructorShouldThow) {
51+
if (gCopyConstructorShouldThrow) {
5252
throw std::exception();
5353
}
5454
// Signal that the constructor has finished running
@@ -67,7 +67,7 @@ int main(int, char**)
6767

6868
vec.push_front(instance);
6969

70-
gCopyConstructorShouldThow = true;
70+
gCopyConstructorShouldThrow = true;
7171
try {
7272
vec.push_front(instance);
7373
}

libcxx/test/std/containers/sequences/list/list.modifiers/push_back_exception_safety.pass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "test_macros.h"
1919

2020
// Flag that makes the copy constructor for CMyClass throw an exception
21-
static bool gCopyConstructorShouldThow = false;
21+
static bool gCopyConstructorShouldThrow = false;
2222

2323

2424
class CMyClass {
@@ -48,7 +48,7 @@ CMyClass::CMyClass(const CMyClass& /*iOther*/) :
4848
fMagicValue(kStartedConstructionMagicValue)
4949
{
5050
// If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
51-
if (gCopyConstructorShouldThow) {
51+
if (gCopyConstructorShouldThrow) {
5252
throw std::exception();
5353
}
5454
// Signal that the constructor has finished running
@@ -67,7 +67,7 @@ int main(int, char**)
6767

6868
vec.push_back(instance);
6969

70-
gCopyConstructorShouldThow = true;
70+
gCopyConstructorShouldThrow = true;
7171
try {
7272
vec.push_back(instance);
7373
}

libcxx/test/std/containers/sequences/list/list.modifiers/push_front_exception_safety.pass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "test_macros.h"
1919

2020
// Flag that makes the copy constructor for CMyClass throw an exception
21-
static bool gCopyConstructorShouldThow = false;
21+
static bool gCopyConstructorShouldThrow = false;
2222

2323

2424
class CMyClass {
@@ -48,7 +48,7 @@ CMyClass::CMyClass(const CMyClass& /*iOther*/) :
4848
fMagicValue(kStartedConstructionMagicValue)
4949
{
5050
// If requested, throw an exception _before_ setting fMagicValue to kFinishedConstructionMagicValue
51-
if (gCopyConstructorShouldThow) {
51+
if (gCopyConstructorShouldThrow) {
5252
throw std::exception();
5353
}
5454
// Signal that the constructor has finished running
@@ -67,7 +67,7 @@ int main(int, char**)
6767

6868
vec.push_front(instance);
6969

70-
gCopyConstructorShouldThow = true;
70+
gCopyConstructorShouldThrow = true;
7171
try {
7272
vec.push_front(instance);
7373
}

libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ struct ZeroOnDestroy : std::ranges::view_base {
4848
};
4949

5050
int main(int, char**) {
51-
auto noDanlingCache = ZeroOnDestroy::dropFirstFour();
51+
auto noDanglingCache = ZeroOnDestroy::dropFirstFour();
5252
// If we use the cached version, it will reference the copied-from view.
5353
// Worst case this is a segfault, best case it's an assertion fired.
54-
assert(*noDanlingCache.begin() == 5);
54+
assert(*noDanglingCache.begin() == 5);
5555

5656
return 0;
5757
}

libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct convertible_sentinel_wrapper {
3232
T it_;
3333
};
3434

35-
struct ConstConveritbleView : BufferView<BufferView<int*>*> {
35+
struct ConstConvertibleView : BufferView<BufferView<int*>*> {
3636
using BufferView<BufferView<int*>*>::BufferView;
3737

3838
using sentinel = convertible_sentinel_wrapper<BufferView<int*>*>;
@@ -43,16 +43,16 @@ struct ConstConveritbleView : BufferView<BufferView<int*>*> {
4343
constexpr sentinel end() { return sentinel(data_ + size_); }
4444
constexpr const_sentinel end() const { return const_sentinel(data_ + size_); }
4545
};
46-
static_assert(!std::ranges::common_range<ConstConveritbleView>);
47-
static_assert(std::convertible_to<std::ranges::sentinel_t<ConstConveritbleView>,
48-
std::ranges::sentinel_t<ConstConveritbleView const>>);
49-
LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<ConstConveritbleView>);
46+
static_assert(!std::ranges::common_range<ConstConvertibleView>);
47+
static_assert(std::convertible_to<std::ranges::sentinel_t<ConstConvertibleView>,
48+
std::ranges::sentinel_t<ConstConvertibleView const>>);
49+
LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<ConstConvertibleView>);
5050

5151
constexpr bool test() {
5252
int buffer[4][4] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
5353
{
5454
BufferView<int*> inners[] = {buffer[0], buffer[1], buffer[2]};
55-
ConstConveritbleView outer(inners);
55+
ConstConvertibleView outer(inners);
5656
std::ranges::join_view jv(outer);
5757
auto sent1 = jv.end();
5858
std::ranges::sentinel_t<const decltype(jv)> sent2 = sent1;

libcxx/test/std/ranges/range.adaptors/range.zip/end.pass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ constexpr bool test() {
154154
}
155155
{
156156
// test ID 13
157-
std::ranges::zip_view v{SimpleNonCommonRandomAcessSized(buffer1)};
157+
std::ranges::zip_view v{SimpleNonCommonRandomAccessSized(buffer1)};
158158
static_assert(std::ranges::common_range<decltype(v)>);
159159
assert(v.begin() + 5 == v.end());
160160
static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>);
161161
}
162162
{
163163
// test ID 14
164-
std::ranges::zip_view v{SimpleNonCommonRandomAcessSized(buffer1), SimpleNonCommonRandomAcessSized(buffer2)};
164+
std::ranges::zip_view v{SimpleNonCommonRandomAccessSized(buffer1), SimpleNonCommonRandomAccessSized(buffer2)};
165165
static_assert(std::ranges::common_range<decltype(v)>);
166166
assert(v.begin() + 1 == v.end());
167167
static_assert(std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>);
@@ -308,14 +308,14 @@ constexpr bool test() {
308308
}
309309
{
310310
// test ID 35
311-
std::ranges::zip_view v{NonSimpleNonCommonRandomAcessSized(buffer1)};
311+
std::ranges::zip_view v{NonSimpleNonCommonRandomAccessSized(buffer1)};
312312
static_assert(std::ranges::common_range<decltype(v)>);
313313
assert(v.begin() + 5 == v.end());
314314
static_assert(!std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>);
315315
}
316316
{
317317
// test ID 36
318-
std::ranges::zip_view v{NonSimpleNonCommonRandomAcessSized(buffer1), NonSimpleNonCommonRandomAcessSized(buffer2)};
318+
std::ranges::zip_view v{NonSimpleNonCommonRandomAccessSized(buffer1), NonSimpleNonCommonRandomAccessSized(buffer2)};
319319
static_assert(std::ranges::common_range<decltype(v)>);
320320
assert(v.begin() + 1 == v.end());
321321
static_assert(!std::is_same_v<decltype(v.end()), decltype(std::as_const(v).end())>);

libcxx/test/std/ranges/range.adaptors/range.zip/types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ struct NonCommonSized : IntBufferView {
127127
};
128128

129129
using SimpleNonCommonSized = NonCommonSized<true>;
130-
using SimpleNonCommonRandomAcessSized = SimpleNonCommonSized;
130+
using SimpleNonCommonRandomAccessSized = SimpleNonCommonSized;
131131
using NonSimpleNonCommonSized = NonCommonSized<false>;
132-
using NonSimpleNonCommonRandomAcessSized = NonSimpleNonCommonSized;
132+
using NonSimpleNonCommonRandomAccessSized = NonSimpleNonCommonSized;
133133

134134
static_assert(!std::ranges::common_range<SimpleNonCommonSized>);
135135
static_assert(std::ranges::random_access_range<SimpleNonCommonSized>);

libcxx/test/std/thread/futures/futures.async/async.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ void f5(int j)
7878
TEST_THROW(j);
7979
}
8080

81-
template <class Ret, class CheckLamdba, class ...Args>
82-
void test(CheckLamdba&& getAndCheckFn, bool IsDeferred, Args&&... args) {
81+
template <class Ret, class CheckLambda, class ...Args>
82+
void test(CheckLambda&& getAndCheckFn, bool IsDeferred, Args&&... args) {
8383
// Reset global state.
8484
invoked = false;
8585

libcxx/test/std/utilities/expected/expected.expected/assign/emplace.intializer_list.pass.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ concept CanEmplace = requires(T t, Args&&... args) { t.emplace(std::forward<Args
3636
static_assert(CanEmplace<std::expected<int, int>, int>);
3737

3838
template <bool Noexcept>
39-
struct CtorFromInitalizerList {
40-
CtorFromInitalizerList(std::initializer_list<int>&) noexcept(Noexcept);
41-
CtorFromInitalizerList(std::initializer_list<int>&, int) noexcept(Noexcept);
39+
struct CtorFromInitializerList {
40+
CtorFromInitializerList(std::initializer_list<int>&) noexcept(Noexcept);
41+
CtorFromInitializerList(std::initializer_list<int>&, int) noexcept(Noexcept);
4242
};
4343

44-
static_assert(CanEmplace<std::expected<CtorFromInitalizerList<true>, int>, std::initializer_list<int>&>);
45-
static_assert(!CanEmplace<std::expected<CtorFromInitalizerList<false>, int>, std::initializer_list<int>&>);
46-
static_assert(CanEmplace<std::expected<CtorFromInitalizerList<true>, int>, std::initializer_list<int>&, int>);
47-
static_assert(!CanEmplace<std::expected<CtorFromInitalizerList<false>, int>, std::initializer_list<int>&, int>);
44+
static_assert(CanEmplace<std::expected<CtorFromInitializerList<true>, int>, std::initializer_list<int>&>);
45+
static_assert(!CanEmplace<std::expected<CtorFromInitializerList<false>, int>, std::initializer_list<int>&>);
46+
static_assert(CanEmplace<std::expected<CtorFromInitializerList<true>, int>, std::initializer_list<int>&, int>);
47+
static_assert(!CanEmplace<std::expected<CtorFromInitializerList<false>, int>, std::initializer_list<int>&, int>);
4848

4949
struct Data {
5050
std::initializer_list<int> il;

libcxx/test/std/utilities/expected/expected.expected/swap/free.swap.pass.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ static_assert(!std::is_swappable_v<std::expected<NotSwappable, int>>);
3131
// !is_swappable_v<E>
3232
static_assert(!std::is_swappable_v<std::expected<int, NotSwappable>>);
3333

34-
struct NotMoveContructible {
35-
NotMoveContructible(NotMoveContructible&&) = delete;
36-
friend void swap(NotMoveContructible&, NotMoveContructible&) {}
34+
struct NotMoveConstructible {
35+
NotMoveConstructible(NotMoveConstructible&&) = delete;
36+
friend void swap(NotMoveConstructible&, NotMoveConstructible&) {}
3737
};
3838

3939
// !is_move_constructible_v<T>
40-
static_assert(!std::is_swappable_v<std::expected<NotMoveContructible, int>>);
40+
static_assert(!std::is_swappable_v<std::expected<NotMoveConstructible, int>>);
4141

4242
// !is_move_constructible_v<E>
43-
static_assert(!std::is_swappable_v<std::expected<int, NotMoveContructible>>);
43+
static_assert(!std::is_swappable_v<std::expected<int, NotMoveConstructible>>);
4444

4545
struct MoveMayThrow {
4646
MoveMayThrow(MoveMayThrow&&) noexcept(false);

libcxx/test/std/utilities/expected/expected.expected/swap/member.swap.pass.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ static_assert(!HasMemberSwap<NotSwappable, int>);
4343
// !is_swappable_v<E>
4444
static_assert(!HasMemberSwap<int, NotSwappable>);
4545

46-
struct NotMoveContructible {
47-
NotMoveContructible(NotMoveContructible&&) = delete;
48-
friend void swap(NotMoveContructible&, NotMoveContructible&) {}
46+
struct NotMoveConstructible {
47+
NotMoveConstructible(NotMoveConstructible&&) = delete;
48+
friend void swap(NotMoveConstructible&, NotMoveConstructible&) {}
4949
};
5050

5151
// !is_move_constructible_v<T>
52-
static_assert(!HasMemberSwap<NotMoveContructible, int>);
52+
static_assert(!HasMemberSwap<NotMoveConstructible, int>);
5353

5454
// !is_move_constructible_v<E>
55-
static_assert(!HasMemberSwap<int, NotMoveContructible>);
55+
static_assert(!HasMemberSwap<int, NotMoveConstructible>);
5656

5757
struct MoveMayThrow {
5858
MoveMayThrow(MoveMayThrow&&) noexcept(false);

libcxx/test/std/utilities/expected/expected.void/swap/free.swap.pass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ void swap(NotSwappable&, NotSwappable&) = delete;
2828
// !is_swappable_v<E>
2929
static_assert(!std::is_swappable_v<std::expected<void, NotSwappable>>);
3030

31-
struct NotMoveContructible {
32-
NotMoveContructible(NotMoveContructible&&) = delete;
33-
friend void swap(NotMoveContructible&, NotMoveContructible&) {}
31+
struct NotMoveConstructible {
32+
NotMoveConstructible(NotMoveConstructible&&) = delete;
33+
friend void swap(NotMoveConstructible&, NotMoveConstructible&) {}
3434
};
3535

3636
// !is_move_constructible_v<E>
37-
static_assert(!std::is_swappable_v<std::expected<void, NotMoveContructible>>);
37+
static_assert(!std::is_swappable_v<std::expected<void, NotMoveConstructible>>);
3838

3939
// Test noexcept
4040
struct MoveMayThrow {

0 commit comments

Comments
 (0)