mirror of
https://github.com/HaishinKit/HaishinKit.swift.git
synced 2026-05-07 20:12:28 +00:00
18 lines
488 B
Swift
18 lines
488 B
Swift
import Foundation
|
|
import Testing
|
|
|
|
@testable import RTMPHaishinKit
|
|
|
|
@Suite struct RTMPConnectionTests {
|
|
@Test func releaseWhenClose() async throws {
|
|
weak var weakConnection: RTMPConnection?
|
|
_ = try? await {
|
|
let connection = RTMPConnection()
|
|
_ = try await connection.connect("rtmp://localhost:19350/live")
|
|
try await connection.close()
|
|
weakConnection = connection
|
|
}()
|
|
#expect(weakConnection == nil)
|
|
}
|
|
}
|