             ])
     }
 
+    func testScan_Into_Empty() {
+        let scheduler = TestScheduler(initialClock: 0)
+
+        let xs = scheduler.createHotObservable([
+            .next(150, 1),
+            .completed(250)
+            ])
+
+        let seed = 42
+
+        let res = scheduler.start {
+            xs.scan(into: seed) { $0 += $1 }
+        }
+
+        XCTAssertEqual(res.events, [
+            .completed(250)
+            ])
+
+        XCTAssertEqual(xs.subscriptions, [
+            Subscription(200, 250)
+            ])
+    }
+
     func testScan_Seed_Return() {
         let scheduler = TestScheduler(initialClock: 0)
 

            ])
    }

    #if TRACE_RESOURCES
        func testScanReleasesResourcesOnComplete() {
            _ = Observable<Int>.just(1).scan(0, accumulator: +).subscribe()


        let res = scheduler.start {
            xs.scan(seed) { $0 + $1 }
        }

        XCTAssertEqual(res.events, [
            .error(250, testError)
            ])

        XCTAssertEqual(xs.subscriptions, [
            Subscription(200, 250)
            ])
    }

    func testScan_Into_Throw() {
        let scheduler = TestScheduler(initialClock: 0)

        let xs = scheduler.createHotObservable([
            .next(150, 1),
            .error(250, testError)
            ])

        let seed = 42

        let res = scheduler.start {
            xs.scan(into: seed) { $0 += $1 }
        }

        XCTAssertEqual(res.events, [
