mirror of
https://github.com/apple/swift-system
synced 2026-11-28 05:14:33 +00:00
Remove PollEvents.allEvents and use internal Event enum for testing
This commit is contained in:
2 files changed
+3
-8
No files matched your search
@@ -56,11 +56,6 @@ extension IORing.Request {
|
||||
case peerClosed = 0x2000
|
||||
}
|
||||
|
||||
@inlinable
|
||||
public static var allEvents: [PollEvents] {
|
||||
Event.allCases.map(PollEvents.init(_:))
|
||||
}
|
||||
|
||||
/// An event indicating data is available for reading.
|
||||
///
|
||||
/// This event becomes active when data arrives on the file descriptor
|
||||
|
||||
@@ -10,9 +10,9 @@ import Musl // for errno
|
||||
#endif
|
||||
|
||||
#if SYSTEM_PACKAGE
|
||||
import SystemPackage
|
||||
@testable import SystemPackage
|
||||
#else
|
||||
import System
|
||||
@testable import System
|
||||
#endif
|
||||
|
||||
// Cache `isUringEnabled()`. The probe is complex and the answer doesn't change
|
||||
@@ -534,7 +534,7 @@ final class IORingTests: XCTestCase {
|
||||
let dt = Duration.seconds(1)
|
||||
let completion = try ring.blockingConsumeCompletion(timeout: dt)
|
||||
|
||||
for event in IORing.Request.PollEvents.allEvents {
|
||||
for event in IORing.Request.PollEvents.Event.allCases {
|
||||
if completion.result & Int32(event.rawValue) != 0 {
|
||||
XCTAssertEqual(event, .hangUp)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user