mirror of
https://github.com/HaishinKit/HaishinKit.swift.git
synced 2026-05-07 20:12:28 +00:00
20 lines
481 B
Swift
20 lines
481 B
Swift
import AVFoundation
|
|
import Foundation
|
|
import Testing
|
|
|
|
@testable import HaishinKit
|
|
|
|
@Suite struct VideoDeviceUnitTests {
|
|
@Test func release() {
|
|
weak var weakDevice: VideoDeviceUnit?
|
|
_ = {
|
|
guard let videoDevice = AVCaptureDevice.default(for: .video) else {
|
|
return
|
|
}
|
|
let device = try? VideoDeviceUnit(0, device: videoDevice)
|
|
weakDevice = device
|
|
}()
|
|
#expect(weakDevice == nil)
|
|
}
|
|
}
|