Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ constexpr bool test() {
static_assert(std::is_same_v<double, decltype(res.value)>);
}
{
// Check aggregate initiazliation
// Check aggregate initialization
out_value_result<int, int> res = {1, 2};
assert(res.out == 1);
assert(res.value == 2);
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/std/atomics/types.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ struct test_atomic<T, /*Integral=*/true, false, false> {
};

template <class T>
struct test_atomic<T, false, /*Foating=*/true, false> {
struct test_atomic<T, false, /*Floating=*/true, false> {
test_atomic() {
using A = std::atomic<T>;
A a;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ template <class Alloc, class AllocatorInvariant = NoOp>
void test_alloc(const Alloc& lhs_alloc = Alloc(),
const Alloc& rhs_alloc = Alloc(),
AllocatorInvariant check_alloc_invariant = NoOp()) {
{ // Test empty/non-empy map combinations
{ // Test empty/non-empty map combinations
{ // assign from a non-empty container into an empty one
using V = std::pair<const int, int>;
using Map = std::map<int, int, std::less<int>, Alloc>;
Expand Down Expand Up @@ -225,7 +225,7 @@ void test_alloc(const Alloc& lhs_alloc = Alloc(),
}
check_alloc_invariant();
}
{ // Make a somewhat larget set to exercise the algorithm a bit
{ // Make a somewhat larger set to exercise the algorithm a bit
using V = std::pair<const int, int>;
using Map = std::map<int, int, std::less<int>, Alloc>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ template <class Alloc, class AllocatorInvariant = NoOp>
void test_alloc(const Alloc& lhs_alloc = Alloc(),
const Alloc& rhs_alloc = Alloc(),
AllocatorInvariant check_alloc_invariant = NoOp()) {
{ // Test empty/non-empy multimap combinations
{ // Test empty/non-empty multimap combinations
{ // assign from a non-empty container into an empty one
using V = std::pair<const int, int>;
using Map = std::multimap<int, int, std::less<int>, Alloc>;
Expand Down Expand Up @@ -223,7 +223,7 @@ void test_alloc(const Alloc& lhs_alloc = Alloc(),
}
check_alloc_invariant();
}
{ // Make a somewhat larget set to exercise the algorithm a bit
{ // Make a somewhat larger set to exercise the algorithm a bit
using V = std::pair<const int, int>;
using Map = std::multimap<int, int, std::less<int>, Alloc>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ template <class Alloc, class AllocatorInvariant = NoOp>
void test_alloc(const Alloc& lhs_alloc = Alloc(),
const Alloc& rhs_alloc = Alloc(),
AllocatorInvariant check_alloc_invariant = NoOp()) {
{ // Test empty/non-empy multiset combinations
{ // Test empty/non-empty multiset combinations
{ // assign from a non-empty container into an empty one
using Set = std::multiset<int, std::less<int>, Alloc>;

Expand Down Expand Up @@ -216,7 +216,7 @@ void test_alloc(const Alloc& lhs_alloc = Alloc(),
assert(std::next(orig.begin(), 3) == orig.end());
}
check_alloc_invariant();
{ // Make a somewhat larget multiset to exercise the algorithm a bit
{ // Make a somewhat larger multiset to exercise the algorithm a bit
using Set = std::multiset<int, std::less<int>, Alloc>;

Set orig(rhs_alloc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ template <class Alloc, class AllocatorInvariant = NoOp>
void test_alloc(const Alloc& lhs_alloc = Alloc(),
const Alloc& rhs_alloc = Alloc(),
AllocatorInvariant check_alloc_invariant = NoOp()) {
{ // Test empty/non-empy set combinations
{ // Test empty/non-empty set combinations
{ // assign from a non-empty container into an empty one
using Set = std::set<int, std::less<int>, Alloc>;

Expand Down Expand Up @@ -218,7 +218,7 @@ void test_alloc(const Alloc& lhs_alloc = Alloc(),
assert(std::next(orig.begin(), 3) == orig.end());
}
check_alloc_invariant();
{ // Make a somewhat larget set to exercise the algorithm a bit
{ // Make a somewhat larger set to exercise the algorithm a bit
using Set = std::set<int, std::less<int>, Alloc>;

Set orig(rhs_alloc);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct NoDefault {
struct test_initialization {
template <typename T>
TEST_CONSTEXPR_CXX14 void operator()() const {
// Check default initalization
// Check default initialization
{
std::array<T, 0> a0;
(void)a0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ TEST_CONSTEXPR_CXX20 bool tests() {

#if TEST_STD_VER >= 11

// Test with various allocators and diffrent size_type
// Test with various allocators and different size_type
{
test(std::vector<int>());
test(std::vector<short, std::allocator<short> >());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void test_allocation_exception_for_strong_guarantee(std::vector<T, Alloc>& v, co
} catch (...) {
}

// As shrink_to_fit may swallow any exceptions, we place the checks outisde the catch block.
// As shrink_to_fit may swallow any exceptions, we place the checks outside the catch block.
assert(v.data() == old_data);
assert(v.size() == old_size);
assert(v.capacity() == old_cap);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "test_macros.h"

// We are not using MinimalElementType.h because MinimalElementType is not
// default consructible and uninitialized storage does not work in constexpr.
// default constructible and uninitialized storage does not work in constexpr.

// Same as MinimalElementType but with a defaulted default constructor
struct MyMinimalElementType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "test_macros.h"

// We are not using MinimalElementType.h because MinimalElementType is not
// default consructible and uninitialized storage does not work in constexpr.
// default constructible and uninitialized storage does not work in constexpr.

// Same as MinimalElementType but with a defaulted default constructor
struct MyMinimalElementType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static_assert(!ConstElementType<std::span<int>>);
static_assert(ConstElementType<std::span<const int, 94>>);
static_assert(!ConstElementType<std::span<int, 94>>);

// Constructor constraings
// Constructor constraints

template <typename I, typename T, std::size_t... N>
concept HasInitializerListCtr = requires(I il) { std::span<T, N...>{il}; };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void test_compare_basic() {
AssertOrderReturn<std::strong_ordering, path>();
#endif

// check comarison results
// check comparison results
assert(testComparisons(p1, p2, /*isEqual*/ E == 0, /*isLess*/ E < 0));
#if TEST_STD_VER > 17
assert(testOrder(p1, p2, E <=> 0));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static void test_cached_values_in_iteration() {
const std::set<fs::path> dir_contents(static_env.RecDirIterationList.begin(), static_env.RecDirIterationList.end());
dir_entries = get_directory_entries_for(testDir, dir_contents);
}
// Testing folder should be deleted after destoying static_test_env.
// Testing folder should be deleted after destroying static_test_env.

for (const auto& dir_entry : dir_entries) {
// During iteration Windows provides information only about symlink itself
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ constexpr bool projectable = requires {

static_assert(!projectable<int, void (*)(int)>); // int isn't indirectly_readable
static_assert(!projectable<S, void (*)(int)>); // S isn't weakly_incrementable
static_assert(!projectable<int*, void(int)>); // void(int) doesn't satisfy indirectly_regular_unary_invcable
static_assert(!projectable<int*, void(int)>); // void(int) doesn't satisfy indirectly_regular_unary_invocable
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ TEST_CONSTEXPR_CXX14 bool test_constexpr() {
return true;
}

struct thowing_copy_constructor {
thowing_copy_constructor() {}
thowing_copy_constructor(const thowing_copy_constructor&) TEST_NOEXCEPT_FALSE {}
struct throwing_copy_constructor {
throwing_copy_constructor() {}
throwing_copy_constructor(const throwing_copy_constructor&) TEST_NOEXCEPT_FALSE {}
};

int main(int, char**)
Expand All @@ -43,11 +43,11 @@ int main(int, char**)
#endif
}
{
std::istream_iterator<thowing_copy_constructor> io;
std::istream_iterator<thowing_copy_constructor> i = io;
assert(i == std::istream_iterator<thowing_copy_constructor>());
std::istream_iterator<throwing_copy_constructor> io;
std::istream_iterator<throwing_copy_constructor> i = io;
assert(i == std::istream_iterator<throwing_copy_constructor>());
#if TEST_STD_VER >= 11
static_assert(!std::is_nothrow_copy_constructible<std::istream_iterator<thowing_copy_constructor>>::value, "");
static_assert(!std::is_nothrow_copy_constructible<std::istream_iterator<throwing_copy_constructor>>::value, "");
#endif
}
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1858,7 +1858,7 @@ void test2() {
// 64 mantissa bits are grouped by nibble as they are stored in the long
// double representation (nibble aligned at the end of the least significant
// bits). This makes 1.0L to be formatted as "0x8p-3" (where the leading
// bit of the mantissa is the higest bit in the 0x8 nibble), and makes
// bit of the mantissa is the highest bit in the 0x8 nibble), and makes
// __LDBL_MAX__ be formatted as "0xf.fffffffffffffffp+16380".
//
// FreeBSD normalizes/aligns the leading bit of the mantissa as a separate
Expand Down
2 changes: 1 addition & 1 deletion libcxx/test/std/numerics/c.math/hermite.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ void test() {
static_assert(sizeof(double) == 8);
for (unsigned n = 0; n < get_maximal_order<Real>(); ++n) {
// Q: Why n=111 and x=300?
// A: Both are chosen s.t. the first overlow occurs for some `n<get_maximal_order<Real>()`.
// A: Both are chosen s.t. the first overflow occurs for some `n<get_maximal_order<Real>()`.
if (n < 111) {
assert(std::isfinite(std::hermite(n, +300.0)));
assert(std::isfinite(std::hermite(n, -300.0)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//
// The const overloads of
// valarray::operator[](...) const
// return propxy objects. These proxies are implicitly convertible to
// return proxy objects. These proxies are implicitly convertible to
// std::valarray.
//
// Validate the function works for valarray, the proxies, and __val_expr.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//
// The const overloads of
// valarray::operator[](...) const
// return propxy objects. These proxies are implicitly convertible to
// return proxy objects. These proxies are implicitly convertible to
// std::valarray.
//
// Validate the function works for valarray, the proxies, and __val_expr.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//
// The const overloads of
// valarray::operator[](...) const
// return propxy objects. These proxies are implicitly convertible to
// return proxy objects. These proxies are implicitly convertible to
// std::valarray.
//
// Validate the function works for valarray, the proxies, and __val_expr.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//
// The const overloads of
// valarray::operator[](...) const
// return propxy objects. These proxies are implicitly convertible to
// return proxy objects. These proxies are implicitly convertible to
// std::valarray.
//
// Validate the function works for valarray, the proxies, and __val_expr.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//
// The const overloads of
// valarray::operator[](...) const
// return propxy objects. These proxies are implicitly convertible to
// return proxy objects. These proxies are implicitly convertible to
// std::valarray.
//
// Validate the function works for valarray, the proxies, and __val_expr.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//
// The const overloads of
// valarray::operator[](...) const
// return propxy objects. These proxies are implicitly convertible to
// return proxy objects. These proxies are implicitly convertible to
// std::valarray.
//
// Validate the function works for valarray, the proxies, and __val_expr.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//
// The const overloads of
// valarray::operator[](...) const
// return propxy objects. These proxies are implicitly convertible to
// return proxy objects. These proxies are implicitly convertible to
// std::valarray.
//
// Validate the function works for valarray, the proxies, and __val_expr.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//
// The const overloads of
// valarray::operator[](...) const
// return propxy objects. These proxies are implicitly convertible to
// return proxy objects. These proxies are implicitly convertible to
// std::valarray.
//
// valarray& operator>>=(const valarray& v);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//
// The const overloads of
// valarray::operator[](...) const
// return propxy objects. These proxies are implicitly convertible to
// return proxy objects. These proxies are implicitly convertible to
// std::valarray.
//
// valarray& operator*=(const valarray& v);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//
// The const overloads of
// valarray::operator[](...) const
// return propxy objects. These proxies are implicitly convertible to
// return proxy objects. These proxies are implicitly convertible to
// std::valarray.
//
// valarray& operator^=(const valarray& v);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// UNSUPPORTED: c++03, c++11, c++14, c++17, c++20

// Some basic examples of how zip_tranform_view might be used in the wild. This is a general
// Some basic examples of how zip_transform_view might be used in the wild. This is a general
// collection of sample algorithms and functions that try to mock general usage of
// this view.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//
// UNSUPPORTED: no-threads, no-exceptions

// ASan seems to try to create threadsm which obviouly doesn't work in this test.
// ASan seems to try to create threadsm which obviously doesn't work in this test.
// UNSUPPORTED: asan, hwasan

// UNSUPPORTED: c++03
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int main(int, char**) {
assert(j1.get_id() == j2Id);
}

// LWG3788: self-assignement
// LWG3788: self-assignment
{
std::jthread j = support::make_test_jthread([] {});
auto oldId = j.get_id();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ template <class CharT>
static void test() {
// Note std::atto can't be tested since the ratio conversion from std::atto
// std::chrono::seconds to std::chrono::hours overflows when intmax_t is a
// 64-bit type. This is a limitiation in the constructor of
// 64-bit type. This is a limitation in the constructor of
// std::chrono::hh_mm_ss.

// C locale - integral power of 10 ratios
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1017,8 +1017,8 @@ static void test_europe_dublin() {

static void test_america_st_johns() {
// A more typical entry,
// Uses letters both when DST is ative and not and has multiple
// letters. Uses negetive offsets.
// Uses letters both when DST is active and not and has multiple
// letters. Uses negative offsets.
// Switches several times between their own and Canadian rules
// Switches the stdoff from -3:30:52 to -3:30 while observing the same rule

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
// The data in the tests can be validated by using the zdump tool. For
// example
// zdump -v Asia/Hong_Kong
// show all transistions in the Hong Kong time zone. Or
// show all transitions in the Hong Kong time zone. Or
// zdump -c1970,1980 -v Asia/Hong_Kong
// shows all transitions in Hong Kong between 1970 and 1980.

Expand Down Expand Up @@ -177,7 +177,7 @@ static void test_antarctica_syowa() {
// This change uses an ON field with a day number
//
// There don't seem to be rule-less zones that use last day or a
// contrained day
// constrained day

// Z Antarctica/Syowa 0 - -00 1957 Ja 29
// 3 - +03
Expand Down Expand Up @@ -605,8 +605,8 @@ static void test_europe_berlin() {

static void test_america_st_johns() {
// A more typical entry,
// Uses letters both when DST is ative and not and has multiple
// letters. Uses negetive offsets.
// Uses letters both when DST is active and not and has multiple
// letters. Uses negative offsets.
// Switches several times between their own and Canadian rules
// Switches the stdoff from -3:30:52 to -3:30 while observing the same rule

Expand Down Expand Up @@ -1036,7 +1036,7 @@ static void test_africa_freetown() {
using namespace std::literals::chrono_literals;
const std::chrono::time_zone* tz = std::chrono::locate_zone("Africa/Freetown");

// When a continuation has a named rule, the tranisition time determined by
// When a continuation has a named rule, the transition time determined by
// the active rule can be wrong. The next continuation may set the clock to an
// earlier time. This is tested for San Luis. This tests the rule is not used
// when the rule is not a named rule.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static void test_ambiguous() {
assert(tz->to_sys(time + 0ms, std::chrono::choose::earliest) == earlier);
assert(tz->to_sys(time + 0s, std::chrono::choose::latest) == later);

// Test times in the ambigious hour
// Test times in the ambiguous hour
assert(tz->to_sys(time + 1s, std::chrono::choose::earliest) == earlier + 1s);
assert(tz->to_sys(time + 1min, std::chrono::choose::latest) == later + 1min);
assert(tz->to_sys(time + 30min, std::chrono::choose::earliest) == earlier + 30min);
Expand Down
Loading
Loading