Skip to content

Commit fa171f5

Browse files
committed
Update .swiftformat
1 parent c0cb140 commit fa171f5

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.swiftformat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
--disable \
2+
hoistAwait, \
3+
hoistTry
4+
5+
--decimalgrouping 3,5
16
--funcattributes prev-line
27
--minversion 0.47.2
38
--maxwidth 96

Tests/AsyncExtensionsTests/AsyncInputStreamTests.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ final class AsyncInputStreamTests: XCTestCase {
1313
let stream = AsyncInputStream(data: Data("Hello!".utf8))
1414
try await AssertEqual([72, 101, 108], await stream.read(maxLength: 3))
1515
try await AssertEqual([108, 111], await stream.read(maxLength: 2))
16-
try await AssertEqual([33], await stream.read(maxLength: 99999))
17-
try await AssertNil(await stream.read(maxLength: 99999))
16+
try await AssertEqual([33], await stream.read(maxLength: 99_999))
17+
try await AssertNil(await stream.read(maxLength: 99_999))
1818
try await AssertThrowsError(
19-
await stream.read(maxLength: 99999),
19+
await stream.read(maxLength: 99_999),
2020
"Should have thrown an error after closing",
2121
{ XCTAssertEqual(.closed, $0 as? AsyncInputStreamError) }
2222
)
@@ -40,10 +40,10 @@ final class AsyncInputStreamTests: XCTestCase {
4040

4141
try await AssertEqual([72, 101, 108], await stream.read(maxLength: 3))
4242
try await AssertEqual([108, 111], await stream.read(maxLength: 2))
43-
try await AssertEqual([33], await stream.read(maxLength: 99999))
44-
try await AssertNil(await stream.read(maxLength: 99999))
43+
try await AssertEqual([33], await stream.read(maxLength: 99_999))
44+
try await AssertNil(await stream.read(maxLength: 99_999))
4545
try await AssertThrowsError(
46-
await stream.read(maxLength: 99999),
46+
await stream.read(maxLength: 99_999),
4747
"Should have thrown an error after closing",
4848
{ XCTAssertEqual(.closed, $0 as? AsyncInputStreamError) }
4949
)

Tests/AsyncExtensionsTests/AsyncOutputStreamTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class AsyncOutputStreamTests: XCTestCase {
3131
try await AssertEqual(4, await stream.write(987_654_321 as Int32))
3232
XCTAssertTrue(buffer.hasPrefix(Data([177, 104, 222, 58, 0, 0, 0])))
3333

34-
try await AssertEqual(2, await stream.write(65123 as UInt16))
34+
try await AssertEqual(2, await stream.write(65_123 as UInt16))
3535
XCTAssertTrue(buffer.hasPrefix(Data([177, 104, 222, 58, 99, 254, 0])))
3636

3737
try await AssertEqual(1, await stream.write(15 as Int8))

0 commit comments

Comments
 (0)