Merge pull request #243 from apple/revert-241-make-runloopmode-nested

Revert "Convert RunLoopMode to RunLoop.Mode as with Darwin Foundation"
diff --git a/Sources/XCTest/Public/Asynchronous/XCTNSPredicateExpectation.swift b/Sources/XCTest/Public/Asynchronous/XCTNSPredicateExpectation.swift
index 08d0cf2..eb28ebc 100644
--- a/Sources/XCTest/Public/Asynchronous/XCTNSPredicateExpectation.swift
+++ b/Sources/XCTest/Public/Asynchronous/XCTNSPredicateExpectation.swift
@@ -95,7 +95,7 @@
             }
         }
 
-        runLoop.add(timer, forMode: .default)
+        runLoop.add(timer, forMode: .defaultRunLoopMode)
         queue.async {
             self.timer = timer
         }
diff --git a/Sources/XCTest/Public/Asynchronous/XCTWaiter.swift b/Sources/XCTest/Public/Asynchronous/XCTWaiter.swift
index 0a404c5..4c91aff 100644
--- a/Sources/XCTest/Public/Asynchronous/XCTWaiter.swift
+++ b/Sources/XCTest/Public/Asynchronous/XCTWaiter.swift
@@ -362,7 +362,7 @@
         let timeIntervalToRun = min(0.1, timeout)
 
         // RunLoop.run(mode:before:) should have @discardableResult <rdar://problem/45371901>
-        _ = runLoop.run(mode: .default, before: Date(timeIntervalSinceNow: timeIntervalToRun))
+        _ = runLoop.run(mode: .defaultRunLoopMode, before: Date(timeIntervalSinceNow: timeIntervalToRun))
     }
 
     func cancelPrimitiveWait() {
diff --git a/Tests/Functional/Asynchronous/Expectations/main.swift b/Tests/Functional/Asynchronous/Expectations/main.swift
index 878511a..15b332a 100644
--- a/Tests/Functional/Asynchronous/Expectations/main.swift
+++ b/Tests/Functional/Asynchronous/Expectations/main.swift
@@ -47,7 +47,7 @@
         let timer = Timer.scheduledTimer(withTimeInterval: 0.1, repeats: false) { _ in
             expectation.fulfill()
         }
-        RunLoop.current.add(timer, forMode: .default)
+        RunLoop.current.add(timer, forMode: .defaultRunLoopMode)
         waitForExpectations(timeout: 1.0)
     }
 
@@ -59,7 +59,7 @@
         let timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: false) { _ in
             expectation.fulfill()
         }
-        RunLoop.current.add(timer, forMode: .default)
+        RunLoop.current.add(timer, forMode: .defaultRunLoopMode)
         waitForExpectations(timeout: 0.1)
     }