Skip to content

Commit 624a54b

Browse files
authored
Spelling stdlib (#42544)
* spelling: abcdefghijklmnopqrstuvwxyz Signed-off-by: Josh Soref <[email protected]> * spelling: clazz Signed-off-by: Josh Soref <[email protected]> * spelling: collection Signed-off-by: Josh Soref <[email protected]> * spelling: compressible Signed-off-by: Josh Soref <[email protected]> * spelling: constituent Signed-off-by: Josh Soref <[email protected]> * spelling: contiguous Signed-off-by: Josh Soref <[email protected]> * spelling: convertibility Signed-off-by: Josh Soref <[email protected]> * spelling: element Signed-off-by: Josh Soref <[email protected]> * spelling: enforce Signed-off-by: Josh Soref <[email protected]> * spelling: exhaustive Signed-off-by: Josh Soref <[email protected]> * spelling: exhausts Signed-off-by: Josh Soref <[email protected]> * spelling: existential Signed-off-by: Josh Soref <[email protected]> * spelling: facilitate Signed-off-by: Josh Soref <[email protected]> * spelling: ignored Signed-off-by: Josh Soref <[email protected]> * spelling: incorporated Signed-off-by: Josh Soref <[email protected]> * spelling: intersection Signed-off-by: Josh Soref <[email protected]> * spelling: laziness Signed-off-by: Josh Soref <[email protected]> * spelling: misaligned Signed-off-by: Josh Soref <[email protected]> * spelling: overhaul Signed-off-by: Josh Soref <[email protected]> * spelling: preamble Signed-off-by: Josh Soref <[email protected]> * spelling: precondition Signed-off-by: Josh Soref <[email protected]> * spelling: replacement Signed-off-by: Josh Soref <[email protected]> * spelling: trailing Signed-off-by: Josh Soref <[email protected]> * spelling: unambiguous Signed-off-by: Josh Soref <[email protected]> * spelling: uncompressible Signed-off-by: Josh Soref <[email protected]> * spelling: world Signed-off-by: Josh Soref <[email protected]> Co-authored-by: Josh Soref <[email protected]>
1 parent 55d9c83 commit 624a54b

25 files changed

+55
-55
lines changed

test/AutoDiff/stdlib/anydifferentiable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ struct Generic<T: Differentiable & Equatable>: Differentiable, Equatable {
1414
}
1515

1616
extension AnyDerivative {
17-
// This exists only to faciliate testing.
17+
// This exists only to facilitate testing.
1818
func moved(along offset: TangentVector) -> Self {
1919
var result = self
2020
result.move(by: offset)

test/stdlib/AnyHashableCasts.swift.gyb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,19 +250,19 @@ AnyHashableCasts.test("Wrappers around bridged strings") {
250250
expectTrue(stringHello.base is String)
251251
expectTrue(nsStringHello.base is NSString) // Through bridging
252252

253-
// Swift wrapper's AnyHashable form doesn't enfore type identity.
253+
// Swift wrapper's AnyHashable form doesn't enforce type identity.
254254
expectNotNil(wrapper1Hello as? StringWrapper1)
255255
expectNotNil(wrapper1Hello as? StringWrapper2)
256256
expectNotNil(wrapper1Hello as? String)
257257
expectNotNil(wrapper1Hello as? NSString)
258258

259-
// String's AnyHashable form doesn't enfore type identity.
259+
// String's AnyHashable form doesn't enforce type identity.
260260
expectNotNil(stringHello as? StringWrapper1)
261261
expectNotNil(stringHello as? StringWrapper2)
262262
expectNotNil(stringHello as? String)
263263
expectNotNil(stringHello as? NSString)
264264

265-
// NSString's AnyHashable form doesn't enfore type identity.
265+
// NSString's AnyHashable form doesn't enforce type identity.
266266
expectNotNil(nsStringHello as? StringWrapper1)
267267
expectNotNil(nsStringHello as? StringWrapper2)
268268
expectNotNil(nsStringHello as? String)

test/stdlib/FlatMapDeprecation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ where C.Elements : BidirectionalCollection {
2525
_ = xs.flatMap(f) // expected-warning {{'flatMap' is deprecated: Please use compactMap(_:) for the case where closure returns an optional value}} expected-note {{compactMap}}
2626
}
2727

28-
func flatMapOnCollectinoOfStrings<
28+
func flatMapOnCollectionOfStrings<
2929
C : Collection
3030
>(xs: C, f: (C.Element) -> String?) {
3131
_ = xs.flatMap(f) // expected-warning {{'flatMap' is deprecated: Please use compactMap(_:) for the case where closure returns an optional value}} expected-note {{compactMap}}

test/stdlib/ForEachField.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ struct LetKeyPaths {
107107
let double: Double
108108
}
109109

110-
protocol TestExisential {}
110+
protocol TestExistential {}
111111

112112
struct KeyPathTypes {
113113
weak var weakObj: TestClass?
@@ -118,7 +118,7 @@ struct KeyPathTypes {
118118
var function: (Int) -> (Int)
119119
var optionalFunction: (Int) -> (Int)?
120120
var enumField: TestEnum
121-
var existential: TestExisential
121+
var existential: TestExistential
122122
var existentialMetatype: Any.Type
123123
var metatype: Int.Type
124124
}

test/stdlib/Integers.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ tests.test("CountLeadingZeros") {
420420
expectEqual(0, Int8.min.leadingZeroBitCount)
421421
}
422422

423-
tests.test("CountTrainlingZeros") {
423+
tests.test("CountTrailingZeros") {
424424
expectEqual(0, UInt8.max.trailingZeroBitCount)
425425
expectEqual(8, UInt8.min.trailingZeroBitCount)
426426
expectEqual(0, Int8.max.trailingZeroBitCount)

test/stdlib/LazySlice.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import StdlibUnittest
66

77
var tests = TestSuite("LazySlice")
88

9-
tests.test("CommuteLazyness") {
9+
tests.test("CommuteLaziness") {
1010
let a = [1,2,3].lazy
1111
let b = a[...]
1212
var c = b.filter { $0 == 0 }

test/stdlib/NewStringAppending.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// REQUIRES: CPU=x86_64, OS=macosx
1212
// UNSUPPORTED: use_os_stdlib
1313

14-
// TODO: Adapt capacity checks into a non-FileCheck more exhuastive test that
14+
// TODO: Adapt capacity checks into a non-FileCheck more exhaustive test that
1515
// can run on older OSes and match their behavior...
1616

1717
import Foundation

test/stdlib/OSLogExecutionTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ internal struct OSLogBufferChecker {
3636
buffer = byteBuffer
3737
}
3838

39-
/// Bit mask for setting bits in the peamble. The bits denoted by the bit
39+
/// Bit mask for setting bits in the preamble. The bits denoted by the bit
4040
/// mask indicate whether there is an argument that is private, and whether
4141
/// there is an argument that is non-scalar: String, NSObject or Pointer.
4242
internal enum PreambleBitMask: UInt8 {

test/stdlib/RuntimeObjC.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -793,8 +793,8 @@ RuntimeClassNamesTestSuite.test("private class nested in same-type-constrained e
793793
let base: NSData? = nil
794794
let util = base.asInner
795795

796-
let clas = unsafeBitCast(type(of: util), to: NSObject.self)
797-
let desc = clas.description
796+
let clazz = unsafeBitCast(type(of: util), to: NSObject.self)
797+
let desc = clazz.description
798798
expectEqual("_TtCE1a", desc.prefix(7))
799799
expectEqual("Inner", desc.suffix(5))
800800
}

test/stdlib/StringAPI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ StringTests.test("Regression/corelibs-foundation") {
390390
}
391391
//If we come here, then the range has created unpaired surrogates on either end.
392392
//An unpaired surrogate is replaced by OXFFFD - the Unicode Replacement Character.
393-
//The CRLF ("\r\n") sequence is also treated like a surrogate pair, but its constinuent
393+
//The CRLF ("\r\n") sequence is also treated like a surrogate pair, but its constituent
394394
//characters "\r" and "\n" can exist outside the pair!
395395

396396
let replacementCharacter = String(describing: UnicodeScalar(0xFFFD)!)

0 commit comments

Comments
 (0)