File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,16 @@ class TestRunLoop : XCTestCase {
69
69
70
70
XCTAssertLessThan ( abs ( timerTickInterval - expectedTimeInterval) , 0.01 )
71
71
}
72
+
73
+ func test_runLoopPoll( ) {
74
+ let runLoop = RunLoop . current
75
+
76
+ let startDate = Date ( )
77
+ runLoop. run ( until: Date ( ) )
78
+ let endDate = Date ( )
79
+
80
+ XCTAssertLessThan ( endDate. timeIntervalSince ( startDate) , 0.5 )
81
+ }
72
82
73
83
func test_commonModes( ) {
74
84
let runLoop = RunLoop . current
@@ -123,6 +133,7 @@ class TestRunLoop : XCTestCase {
123
133
// these tests do not work the same as Darwin https://bugs.swift.org/browse/SR-399
124
134
// ("test_runLoopRunMode", test_runLoopRunMode),
125
135
// ("test_runLoopLimitDate", test_runLoopLimitDate),
136
+ ( " test_runLoopPoll " , test_runLoopPoll) ,
126
137
( " test_addingRemovingPorts " , test_addingRemovingPorts) ,
127
138
]
128
139
}
You can’t perform that action at this time.
0 commit comments