     let canceled = deferred.cancel()
     XCTAssert(canceled)
 
-    if let error = deferred.error
-    {
+    switch deferred.result
+    {
+    case .Error(let error):
       XCTAssertFalse(error is DeferredError)
       let e = error as NSError
       XCTAssert(e.domain == NSURLErrorDomain)
       XCTAssert(e.code == NSURLErrorCancelled)
-    }
-    else
-    {
-      XCTFail()
+    default:
+      XCTFail("failed to cancel?")
     }
 
     session.invalidateAndCancel()

      return session.deferredDownloadTask(url)
    }()

    _ = deferred.error
    // Nope: XCTAssertNil(deferred.task)

    let canceled = deferred.cancel()
    XCTAssert(canceled == false)

      return false
    }

    switch success.result
    {
    case .Value(let success) where success == true: break // savor success
    case .Value:            XCTFail("Failed without error")
    case .Error(let error): XCTFail(String(error))
    }

    session.invalidateAndCancel()
