1- // RUN: %empty-directory(%t)
2- // RUN: %target-build-swift %s -o %t/a.out
3- // RUN: %target-codesign %t/a.out
4- //
5- // RUN: %target-run %t/a.out
1+ // RUN: %target-run-simple-swift
62// REQUIRES: executable_test
7-
8- // REQUIRES: objc_interop
3+ // REQUIRES: libdispatch
94
105import Dispatch
11- import Foundation
126import StdlibUnittest
137
148
@@ -126,18 +120,6 @@ DispatchAPI.test("DispatchTime.addSubtract") {
126120
127121 then = DispatchTime . now ( ) - Double. nan
128122 expectEqual ( DispatchTime . distantFuture, then)
129-
130- then = DispatchTime . now ( ) + Date. distantFuture. timeIntervalSinceNow
131- expectEqual ( DispatchTime ( uptimeNanoseconds: UInt64 . max) , then)
132-
133- then = DispatchTime . now ( ) + Date. distantPast. timeIntervalSinceNow
134- expectEqual ( DispatchTime ( uptimeNanoseconds: 1 ) , then)
135-
136- then = DispatchTime . now ( ) - Date. distantFuture. timeIntervalSinceNow
137- expectEqual ( DispatchTime ( uptimeNanoseconds: 1 ) , then)
138-
139- then = DispatchTime . now ( ) - Date. distantPast. timeIntervalSinceNow
140- expectEqual ( DispatchTime ( uptimeNanoseconds: UInt64 . max) , then)
141123}
142124
143125DispatchAPI . test ( " DispatchWallTime.addSubtract " ) {
@@ -154,18 +136,6 @@ DispatchAPI.test("DispatchWallTime.addSubtract") {
154136
155137 then = DispatchWallTime . now ( ) - Double. nan
156138 expectEqual ( DispatchWallTime . distantFuture, then)
157-
158- then = DispatchWallTime . now ( ) + Date. distantFuture. timeIntervalSinceNow
159- expectEqual ( DispatchWallTime . distantFuture, then)
160-
161- then = DispatchWallTime . now ( ) + Date. distantPast. timeIntervalSinceNow
162- expectEqual ( distantPastRawValue, then. rawValue)
163-
164- then = DispatchWallTime . now ( ) - Date. distantFuture. timeIntervalSinceNow
165- expectEqual ( distantPastRawValue, then. rawValue)
166-
167- then = DispatchWallTime . now ( ) - Date. distantPast. timeIntervalSinceNow
168- expectEqual ( DispatchWallTime . distantFuture, then)
169139}
170140
171141DispatchAPI . test ( " DispatchTime.uptimeNanos " ) {
0 commit comments