Remove PollEvents.allEvents and use internal Event enum for testing

This commit is contained in:
Jonathan Flat committed 2026-09-24 19:37:41 -06:00
1 parent 59b5659a1e
commit 1c80f27aef
2 files changed
+3 -8

No files matched your search

-5
View File
@@ -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
+3 -3
View File
@@ -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