mirror of
https://github.com/apple/swift-nio
synced 2026-11-29 05:24:21 +00:00
Adopt swift-format (#2794)
* Apply formatting
* Apply no block comments rule
* Apply OmitExplicitReturns
* Apple OnlyOneTrailingClosureArgument
* Apply NoAssignmentInExpressions
* Fix up DontRepeatTypeInStaticProperties lint errors
* Apply `OrderedImports`
* Apply `ReplaceForEachWithForLoop`
* format file
* Enable the formatting pipeline
* Adopt `AmbiguousTrailingClosureOverload`
* Fix license header
* Fix format check
* Fix `EndOfLineComment`
* Fix CI
* Adapt CI script to check if changes when running formatting
* Separate lint and format into to steps
* Fix format
* Adopt `UseEarlyExits`
* Revert "Adopt `UseEarlyExits`"
This reverts commit d1ac5bbe12.
This commit is contained in:
1 parent
980bd3e630
commit
c9756e1083
374 files changed
+23992
-14890
No files matched your search
@@ -11,13 +11,15 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
import NIOCore
|
||||
@testable import NIOEmbedded
|
||||
import XCTest
|
||||
import NIOConcurrencyHelpers
|
||||
import Atomics
|
||||
|
||||
private class EmbeddedTestError: Error { }
|
||||
import Atomics
|
||||
import NIOConcurrencyHelpers
|
||||
import NIOCore
|
||||
import XCTest
|
||||
|
||||
@testable import NIOEmbedded
|
||||
|
||||
private class EmbeddedTestError: Error {}
|
||||
|
||||
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
|
||||
final class NIOAsyncTestingEventLoopTests: XCTestCase {
|
||||
@@ -453,13 +455,13 @@ final class NIOAsyncTestingEventLoopTests: XCTestCase {
|
||||
let tasksRun = ManagedAtomic(0)
|
||||
let startTime = eventLoop.now
|
||||
|
||||
eventLoop.scheduleTask(in: .nanoseconds(3141592)) {
|
||||
XCTAssertEqual(eventLoop.now, startTime + .nanoseconds(3141592))
|
||||
eventLoop.scheduleTask(in: .nanoseconds(3_141_592)) {
|
||||
XCTAssertEqual(eventLoop.now, startTime + .nanoseconds(3_141_592))
|
||||
tasksRun.wrappingIncrement(ordering: .relaxed)
|
||||
}
|
||||
|
||||
eventLoop.scheduleTask(in: .seconds(3141592)) {
|
||||
XCTAssertEqual(eventLoop.now, startTime + .seconds(3141592))
|
||||
eventLoop.scheduleTask(in: .seconds(3_141_592)) {
|
||||
XCTAssertEqual(eventLoop.now, startTime + .seconds(3_141_592))
|
||||
tasksRun.wrappingIncrement(ordering: .relaxed)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user